mirror of
https://github.com/zsh-users/zsh
synced 2024-10-14 11:53:24 +00:00
35694: fix handling of history modifiers applied across all elements of an array parameter value
This commit is contained in:
parent
68a5a5f453
commit
a9add3de54
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
2015-07-06 Barton E. Schaefer <schaefer@zsh.org>
|
||||
|
||||
* unposted: Doc/Zsh/expn.yo: alphabetize ${(b)...} flag
|
||||
|
||||
* 35709: Doc/Zsh/expn.yo: explain :s/// modifier contexts
|
||||
|
||||
* 35694: Src/subst.c, Test/D04parameter.ztst: fix handling of
|
||||
history modifiers (specifically :s/l/r/) when applied across all
|
||||
elements of an array parameter value
|
||||
|
||||
2015-07-06 Oliver Kiddle <opk@zsh.org>
|
||||
|
||||
* 35704: Doc/Zsh/compwid.yo, Src/Zle/compcore.c, Src/Zle/complete.c;
|
||||
|
|
10
Src/subst.c
10
Src/subst.c
|
@ -3834,8 +3834,14 @@ paramsubst(LinkList l, LinkNode n, char **str, int qt, int pf_flags)
|
|||
y = dupstring(nulstring);
|
||||
insertlinknode(l, n, (void *) y), incnode(n);
|
||||
}
|
||||
if (eval)
|
||||
n = on;
|
||||
/* This used to omit restoring of *str and instead test
|
||||
* if (eval)
|
||||
* n = on;
|
||||
* but that causes strange behavior of history modifiers when
|
||||
* applied across all values of an array. What is magic about
|
||||
* eval here that *str seemed not to need restoring?
|
||||
*/
|
||||
*str = getdata(n = on);
|
||||
} else {
|
||||
/*
|
||||
* Scalar value. Handle last minute transformations
|
||||
|
|
|
@ -1711,3 +1711,12 @@
|
|||
0:Avoid confusion after overloaded characters in braceless substitution in sh
|
||||
>13
|
||||
>0-1
|
||||
|
||||
a="aaa bab cac"
|
||||
b=d
|
||||
echo $a:gs/a/${b}/
|
||||
a=(aaa bab cac)
|
||||
echo $a:gs/a/${b}/
|
||||
0:History modifier works the same for scalar and array substitution
|
||||
>ddd bdb cdc
|
||||
>ddd bdb cdc
|
||||
|
|
Loading…
Reference in a new issue