Skip to content

Instantly share code, notes, and snippets.

@crccheck
Last active August 29, 2015 14:06
Show Gist options
  • Save crccheck/505a41e2d60971786159 to your computer and use it in GitHub Desktop.
Save crccheck/505a41e2d60971786159 to your computer and use it in GitHub Desktop.
# Invoke cheat
function inv {
# if no parameters, then assume we want to list tasks
if [ -z $1 ]; then
invoke --list
else
# invoke expects --help to be first, so move it if it isn't
local numargs=$#
for ((i=2; i <= numargs ; i++))
do
if [ ${@:$i:1} == "--help" ]; then
set -- "--help" ${@:1:$i - 1} ${@:$i + 1}
fi
done
invoke $@
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment