Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions etc/bash_completion.d/phpcc-completion
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,18 @@ __comp_phpcc_command(){
options+=( shebang-less )

case "${prev}" in
--banner|--dir|--file|--main|--output)
# if a previous typed option expects a file or directory path,
# let the reply empty so that readline's default completion is used
# previous typed option expects a file path
--banner|--file|--main|--output)
compgen -d -f ${cur}
;;

# previous typed option expects a directory path
--dir)
compgen -d ${cur}
;;

# previous typed option is not elligible to completion
--meta)
;;

*)
Expand All @@ -61,4 +70,4 @@ __comp_phpcc_command(){
;;
esac
}
complete -o default -C __comp_phpcc_command phpcc
complete -C __comp_phpcc_command phpcc