Last active
August 29, 2015 14:07
-
-
Save Tatsh/2fa4c98dd3e9f41004ad to your computer and use it in GitHub Desktop.
PHP Bash completion
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
# kate: hl bash | |
_php() { | |
local cur prev opts | |
COMPREPLY=() | |
cur="${COMP_WORDS[COMP_CWORD]}" | |
prev="${COMP_WORDS[COMP_CWORD-1]}" | |
opts="-a | |
-c | |
-n | |
-d | |
-e | |
-f | |
-i | |
-h | |
-l | |
-m | |
-r | |
-B | |
-R | |
-F | |
-E | |
-H | |
-S | |
-t | |
-s | |
-v | |
-w | |
-z | |
--ini | |
--rf | |
--rc | |
--re | |
--rz | |
--ri | |
" | |
case "${prev}" in | |
*) | |
;; | |
esac | |
if [[ ${cur} == -* ]]; then | |
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) | |
fi | |
return 0 | |
} | |
complete -F _php -o default php |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment