Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
bash completion for "powder"
# you must install powder gem
#
# gem install powder
#
#
_powder()
{
local cur prev opts
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
opts="`powder | tail -r | awk '{print $2}' | xargs`"
if [[ ${cur} == * ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
return 0
fi
}
complete -F _powder powder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.