Created
October 23, 2013 18:49
-
-
Save GeorgeErickson/7124337 to your computer and use it in GitHub Desktop.
Super simple bash completion for lunchy
This file contains 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
__lunchy() { | |
COMPREPLY=() | |
local current=${COMP_WORDS[COMP_CWORD]} | |
if [[ $COMP_CWORD == 1 ]] | |
then | |
COMPREPLY=(start stop restart ls list status install show edit) | |
else | |
COMPREPLY=($(compgen -W '$(lunchy list)' -- $current)) | |
fi | |
} | |
complete -F __lunchy -o default lunchy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment