1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-29 19:00:57 +02:00

27865: fix problem with glob_subst in parameter subsitution

This commit is contained in:
Peter Stephenson 2010-04-09 15:40:13 +00:00
parent 27c1ca8628
commit e2d855f364
3 changed files with 17 additions and 2 deletions

View file

@ -1,5 +1,10 @@
2010-04-09 Peter Stephenson <pws@csr.com>
* 27865: Src/subst.c, Test/D04parameter.ztst: text in parameter
substitution that came from the command line rather than the
parameter was a candidate for GLOB_SUBST even if it was quoted
if the overall expression was not quoted.
* Ben: 27589: Completion/Zsh/Context/_redirect: attempt
to use arguments better.
@ -12988,5 +12993,5 @@
*****************************************************
* This is used by the shell to define $ZSH_PATCHLEVEL
* $Revision: 1.4949 $
* $Revision: 1.4950 $
*****************************************************

View file

@ -2417,7 +2417,7 @@ paramsubst(LinkList l, LinkNode n, char **str, int qt, int ssub)
multsub(&val, spbreak && !aspar, (aspar ? NULL : &aval), &isarr, NULL);
opts[SHWORDSPLIT] = ws;
copied = 1;
spbreak = 0;
spbreak = globsubst = 0;
}
break;
case ':':

View file

@ -221,6 +221,16 @@
>\\foo matched by \\*\\
>a\\b not matched by \\*\\
(
setopt globsubst
foo="boring*"
print ${foo+$foo}
print ${foo+"$foo"}
)
0:globsubst together with nested quoted expansion
>boringfile
>boring*
print -l "${$(print one word)}" "${=$(print two words)}"
0:splitting of $(...) inside ${...}
>one word