Skip to content

Instantly share code, notes, and snippets.

@cordoval
Forked from Stubbs/behat.sh
Created November 23, 2011 16:44
Show Gist options
  • Save cordoval/1389169 to your computer and use it in GitHub Desktop.
Save cordoval/1389169 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-paths --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