Created
November 23, 2011 14:17
-
-
Save Stubbs/1388769 to your computer and use it in GitHub Desktop.
Behat Bash Autocompletion
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
# | |
# Add this to your /etc/bash_completion.d directory for behat parameter auto completion. | |
# | |
_behat() | |
{ | |
local cur prev opts | |
COMPREPLY=() | |
cur="${COMP_WORDS[COMP_CWORD]}" | |
prev="${COMP_WORDS[COMP_CWORD-1]}" | |
opts="--config --profile --init --format --out --colous --no-colors --no-time --lang --no-path --no-snippets --snippets-paths --no-multiline --expand --story-syntax --definitions --name --tags --rerun --strict" | |
if [[ ${cur} == -* ]] ; then | |
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) | |
return 0 | |
fi | |
} | |
complete -F _behat behat |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
wish you could just github this one
found an error
https://gist.github.com/1389169