-
-
Save grachevko/e3dc0563b2b2a21027348e9ef4ef383e to your computer and use it in GitHub Desktop.
Symfony 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
## add me to /etc/bash_completion.d/ | |
## cp FILE /etc/bash_completion.d/ | |
## reload completion | |
## exec bash | |
_available_commands() | |
{ | |
bin/console list --raw | awk '{print $1}' | |
} | |
_symfony() | |
{ | |
local cur | |
cur="${COMP_WORDS[COMP_CWORD]}" | |
prev=${COMP_WORDS[COMP_CWORD-1]} | |
if [ $COMP_CWORD -eq 1 ] | |
then | |
COMPREPLY=( $( compgen -W '$(_available_commands)' -- $cur) ) | |
fi | |
} | |
complete -F _symfony bin/console | |
COMP_WORDBREAKS=${COMP_WORDBREAKS//:} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment