diff options
author | Barton E. Schaefer <schaefer@zsh.org> | 2015-07-06 12:02:36 -0700 |
---|---|---|
committer | Barton E. Schaefer <schaefer@zsh.org> | 2015-07-06 16:35:05 -0700 |
commit | a9add3de545d71be3d882f94714e4d2857b0ef15 (patch) | |
tree | 015fa8f5110e8d87f2cdf191213d53054dc7e2ce /Src | |
parent | 68a5a5f453d9534748e12d268718a97b7e84c31b (diff) | |
download | zsh-a9add3de545d71be3d882f94714e4d2857b0ef15.tar.gz zsh-a9add3de545d71be3d882f94714e4d2857b0ef15.tar.xz zsh-a9add3de545d71be3d882f94714e4d2857b0ef15.zip |
35694: fix handling of history modifiers applied across all elements of an array parameter value
Diffstat (limited to 'Src')
-rw-r--r-- | Src/subst.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Src/subst.c b/Src/subst.c index 81d34d28a..021d23444 100644 --- a/Src/subst.c +++ b/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 |