Skip to content

Instantly share code, notes, and snippets.

@GeorgeErickson
Created October 23, 2013 18:49
Show Gist options
  • Save GeorgeErickson/7124337 to your computer and use it in GitHub Desktop.
Save GeorgeErickson/7124337 to your computer and use it in GitHub Desktop.
Super simple bash completion for lunchy
__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