Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[PATCH] Fix zstyle lookup with _php: use trailing colon



From: Daniel Hahler <git@xxxxxxxxxx>

This replaces the previous patch from 35287.

Thanks to Daniel Shahaf for notifying me about the "local curcontext" being
required, because of "_arguments -C".

---
 Completion/Unix/Command/_php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Completion/Unix/Command/_php b/Completion/Unix/Command/_php
index 5d7b84e..4edcd1e 100644
--- a/Completion/Unix/Command/_php
+++ b/Completion/Unix/Command/_php
@@ -9,7 +9,7 @@ typeset -A opt_args
 local -a args
 local exclusions php_suffix
 
-zstyle -s ":completion:$curcontext" suffixes php_suffix '|' || php_suffix='php|phar'
+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
-- 
2.4.1.dirty



Messages sorted by: Reverse Date, Date, Thread, Author