Created
May 4, 2011 22:19
-
-
Save serby/956157 to your computer and use it in GitHub Desktop.
maiden bash completion
This file contains hidden or 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
| _maiden() | |
| { | |
| local cur prev opts | |
| cur="${COMP_WORDS[COMP_CWORD]}" | |
| prev="${COMP_WORDS[COMP_CWORD-1]}" | |
| opts="-h -l -b -v -q" | |
| if [ -e "Maiden.php" ] | |
| then | |
| targets=`echo ""| maiden -b | sort -u` | |
| COMPREPLY=( $(compgen -W "${targets}" -- ${cur}) ) | |
| return 0 | |
| fi | |
| COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) | |
| return 0 | |
| } | |
| complete -F _maiden maiden |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment