Skip to content

Instantly share code, notes, and snippets.

@fluffywaffles
Created February 24, 2016 17:27
Show Gist options
  • Save fluffywaffles/38663aed9f9e3b774ec6 to your computer and use it in GitHub Desktop.
Save fluffywaffles/38663aed9f9e3b774ec6 to your computer and use it in GitHub Desktop.
fucking broken because bash is the worst scripting language
alias cgrep="grep --color=always"
todo () {
echo "$1 $2"
local cmd="ghi"
local end="-- skorlir/todo"
if [ "$1" = "--help" ] || [ "$1" = "help" ]; then
echo $(sed 's/ {2,}//g' << EOC
$cmd $@ |
sed 's/ghi/todo/g' 's/issue/todo/g' 's/an todo/a todo/g'
EOC)
else
cmd="$cmd $@ $end"
fi
echo "$cmd"
eval $cmd
}
@fluffywaffles
Copy link
Author

todo () {
  eval "ghi $@ -- skorlir/todo"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment