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 |
Author
Stubbs
commented
Nov 23, 2011
via email
Yeah, just drop it in there.
next time you log in it will load it automatically, but in the mean
time you can load it manually by doing:
source /etc/bash_completion.d/behat.sh
…-S
Follow me on Twitter: http://twitter.com/stubbs
Blog: http://stubblog.wordpress.com
My art: http://stuartgrimshaw.imagekind.com
Stock Images: http://en.fotolia.com/partner/16775
On Wed, Nov 23, 2011 at 2:44 PM, Luis Cordova ***@***.*** wrote:
gotta be kidding me, nice job man, hey do you know how to configure this? just drop the file in the directory and that is it? no previous configurations? i am on ubuntu latest
---
Reply to this email directly or view it on GitHub:
https://gist.github.com/1388769
wish you could just github this one
found an error
https://gist.github.com/1389169
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment