Last active
August 29, 2015 14:06
-
-
Save crccheck/505a41e2d60971786159 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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