Created
April 16, 2015 13:01
-
-
Save laubstein/c049e9c05a437791e8cd to your computer and use it in GitHub Desktop.
Yeoman Available Generators Bash Completion
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
#!/bin/bash | |
_yo_complete() | |
{ | |
local cur_word prev_word type_list | |
cur_word="${COMP_WORDS[COMP_CWORD]}" | |
prev_word="${COMP_WORDS[COMP_CWORD-1]}" | |
type_list=`yo --help | tail -n+8` | |
COMPREPLY=( $(compgen -W "${type_list}" -- ${cur_word}) ) | |
return 0 | |
} | |
complete -F _yo_complete yo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment