From 4446df3dff7c75b7c771435f2613ec1df3a77bbd Mon Sep 17 00:00:00 2001 From: Sven Wischnowsky Date: Wed, 29 May 2002 15:05:22 +0000 Subject: 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) --- ChangeLog | 7 +++++++ Completion/Unix/Type/_path_files | 6 ++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 17f9a5ffa..df82bff5a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2002-05-29 Sven Wischnowsky + + * 17252: Completion/Unix/Type/_path_files: 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 + 2002-05-29 Peter Stephenson * 17250: Src/signals.c: don't execsave()/execrestore() around 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:# #}" ) -- cgit 1.4.1