From f5ad1ccbd6dc6230f0344635791db3fd11966a3a Mon Sep 17 00:00:00 2001 From: "Barton E. Schaefer" Date: Sun, 1 Jun 2014 15:21:13 -0700 Subject: 32653: complete files with the ".phar" extension as well as ".php" Also respect the suffixes zstyle to change the extensions --- Completion/Unix/Command/_php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Completion') diff --git a/Completion/Unix/Command/_php b/Completion/Unix/Command/_php index bbb6a667b..5d7b84e28 100644 --- a/Completion/Unix/Command/_php +++ b/Completion/Unix/Command/_php @@ -7,7 +7,10 @@ local curcontext="$curcontext" line state expl typeset -A opt_args local -a args -local exclusions php_files=':PHP file:_files -g "*.php(-.)"' +local exclusions php_suffix + +zstyle -s ":completion:$curcontext" suffixes php_suffix '|' || php_suffix='php|phar' +local php_files=":PHP file:_files -g '*.($php_suffix)(-.)'" if _pick_variant php5=PHP\ 5 php4 --version; then exclusions="-B --process-begin -R --process-code -F --process-file -E --process-end" -- cgit 1.4.1