mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-01-11 08:21:13 +01:00
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)
This commit is contained in:
parent
1ca8378051
commit
4446df3dff
2 changed files with 11 additions and 2 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2002-05-29 Sven Wischnowsky <wischnow@zsh.org>
|
||||||
|
|
||||||
|
* 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 <pws@csr.com>
|
2002-05-29 Peter Stephenson <pws@csr.com>
|
||||||
|
|
||||||
* 17250: Src/signals.c: don't execsave()/execrestore() around
|
* 17250: Src/signals.c: don't execsave()/execrestore() around
|
||||||
|
|
|
@ -23,9 +23,11 @@ sopt="-${(@j::M)${(@)tmp1#-}#?}"
|
||||||
(( $tmp1[(I)-[/g]*] )) && haspats=yes
|
(( $tmp1[(I)-[/g]*] )) && haspats=yes
|
||||||
(( $tmp1[(I)-g*] )) && gopt=yes
|
(( $tmp1[(I)-g*] )) && gopt=yes
|
||||||
if (( $tmp1[(I)-/] )); then
|
if (( $tmp1[(I)-/] )); then
|
||||||
pats=( '*(-/)' ${(z)${(M)tmp1:#-g*}#-g} )
|
pats="${(@)${(@M)tmp1:#-g*}#-g}"
|
||||||
|
pats=( '*(-/)' ${${(z):-x $pats}[2,-1]} )
|
||||||
else
|
else
|
||||||
pats=( "${(@z)${(@M)tmp1:#-g*}#-g}" )
|
pats="${(@)${(@M)tmp1:#-g*}#-g}"
|
||||||
|
pats=( ${${(z):-x $pats}[2,-1]} )
|
||||||
fi
|
fi
|
||||||
pats=( "${(@)pats:# #}" )
|
pats=( "${(@)pats:# #}" )
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue