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
_composer_scripts() { | |
local cur="${COMP_WORDS[COMP_CWORD]}" | |
local scripts=$(composer run-script -l --no-ansi 2> /dev/null | awk '/^ +[a-z]+/ { print $1 }') | |
COMPREPLY=( $(compgen -W "${scripts}" -- ${cur}) ) | |
return 0 | |
} | |
complete -F _composer_scripts composer |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This requires a newer version of bash completion but works correctly when the script name contains
:
i.e.test:unit
: