zsh-workers
 help / color / mirror / code / Atom feed
* [PATCH] Fix zstyle lookup with _php: use trailing colon
@ 2015-05-25 15:21 Daniel Hahler
  2015-05-25 19:10 ` Daniel Hahler
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Hahler @ 2015-05-25 15:21 UTC (permalink / raw)
  To: zsh-workers

From: Daniel Hahler <git@thequod.de>

---
 Completion/Unix/Command/_php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Completion/Unix/Command/_php b/Completion/Unix/Command/_php
index 5d7b84e..2495898 100644
--- a/Completion/Unix/Command/_php
+++ b/Completion/Unix/Command/_php
@@ -3,13 +3,13 @@
 # PHP 5.0.4  (cli)
 # PHP 4.3.11 (cli)
 
-local curcontext="$curcontext" line state expl
+local line state expl
 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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH] Fix zstyle lookup with _php: use trailing colon
  2015-05-25 15:21 [PATCH] Fix zstyle lookup with _php: use trailing colon Daniel Hahler
@ 2015-05-25 19:10 ` Daniel Hahler
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Hahler @ 2015-05-25 19:10 UTC (permalink / raw)
  To: zsh-workers

From: Daniel Hahler <git@thequod.de>

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-05-25 19:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-25 15:21 [PATCH] Fix zstyle lookup with _php: use trailing colon Daniel Hahler
2015-05-25 19:10 ` Daniel Hahler

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).