mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-06-13 04:56:30 +02: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>
|
2015-07-06 Oliver Kiddle <opk@zsh.org>
|
||||||
|
|
||||||
* 35704: Doc/Zsh/compwid.yo, Src/Zle/compcore.c, Src/Zle/complete.c;
|
* 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);
|
y = dupstring(nulstring);
|
||||||
insertlinknode(l, n, (void *) y), incnode(n);
|
insertlinknode(l, n, (void *) y), incnode(n);
|
||||||
}
|
}
|
||||||
if (eval)
|
/* This used to omit restoring of *str and instead test
|
||||||
n = on;
|
* 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 {
|
} else {
|
||||||
/*
|
/*
|
||||||
* Scalar value. Handle last minute transformations
|
* Scalar value. Handle last minute transformations
|
||||||
|
|
|
@ -1711,3 +1711,12 @@
|
||||||
0:Avoid confusion after overloaded characters in braceless substitution in sh
|
0:Avoid confusion after overloaded characters in braceless substitution in sh
|
||||||
>13
|
>13
|
||||||
>0-1
|
>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 New Issue