Skip to content

Instantly share code, notes, and snippets.

@Tatsh
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Tatsh/2fa4c98dd3e9f41004ad to your computer and use it in GitHub Desktop.
Save Tatsh/2fa4c98dd3e9f41004ad to your computer and use it in GitHub Desktop.
PHP Bash completion
# 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