about summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2002-05-29 15:05:22 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2002-05-29 15:05:22 +0000
commit4446df3dff7c75b7c771435f2613ec1df3a77bbd (patch)
treecdd23874b9a81eb849da5d141298b1e6513d364a /Completion
parent1ca8378051227d70700d9f754d22e1bbde2924ad (diff)
downloadzsh-4446df3dff7c75b7c771435f2613ec1df3a77bbd.tar.gz
zsh-4446df3dff7c75b7c771435f2613ec1df3a77bbd.tar.xz
zsh-4446df3dff7c75b7c771435f2613ec1df3a77bbd.zip
fix for use of (z) parameter modifier; the first word in the parameter is parsed like the first word on a command line, treating parens specially (17252)
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Unix/Type/_path_files6
1 files changed, 4 insertions, 2 deletions
diff --git a/Completion/Unix/Type/_path_files b/Completion/Unix/Type/_path_files
index b41f8afa9..dd1089e67 100644
--- a/Completion/Unix/Type/_path_files
+++ b/Completion/Unix/Type/_path_files
@@ -23,9 +23,11 @@ sopt="-${(@j::M)${(@)tmp1#-}#?}"
 (( $tmp1[(I)-[/g]*] )) && haspats=yes
 (( $tmp1[(I)-g*] )) && gopt=yes
 if (( $tmp1[(I)-/] )); then
-  pats=( '*(-/)' ${(z)${(M)tmp1:#-g*}#-g} )
+  pats="${(@)${(@M)tmp1:#-g*}#-g}"
+  pats=( '*(-/)' ${${(z):-x $pats}[2,-1]} )
 else
-  pats=( "${(@z)${(@M)tmp1:#-g*}#-g}" )
+  pats="${(@)${(@M)tmp1:#-g*}#-g}"
+  pats=( ${${(z):-x $pats}[2,-1]} )
 fi
 pats=( "${(@)pats:# #}" )