Skip to content

Instantly share code, notes, and snippets.

@tokibito
Created July 5, 2011 04:46
Show Gist options
  • Save tokibito/1064260 to your computer and use it in GitHub Desktop.
Save tokibito/1064260 to your computer and use it in GitHub Desktop.
bash completion for aodag.scaffold
_comp_scaffold() {
local cur prev lst
cur=${COMP_WORDS[COMP_CWORD]}
prev=${COMP_WORDS[COMP_CWORD-1]}
lst=`scaffold list|xargs echo`
COMPREPLY=()
if [[ "$prev" == create* ]]; then
COMPREPLY=( $(compgen -W '${lst}' $cur) );
return 0;
fi
COMPREPLY=( $(compgen -W 'create list install -h --help -d --scaffolds-drectory' $cur) );
return 0;
}
complete -F _comp_scaffold scaffold
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment