Skip to content

Instantly share code, notes, and snippets.

@Stubbs
Created November 23, 2011 14:17
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Stubbs/1388769 to your computer and use it in GitHub Desktop.
Save Stubbs/1388769 to your computer and use it in GitHub Desktop.
Behat Bash Autocompletion
#
# 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
@cordoval
Copy link

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

@Stubbs
Copy link
Author

Stubbs commented Nov 23, 2011 via email

@cordoval
Copy link

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