diff options
author | Barton E. Schaefer <schaefer@zsh.org> | 2017-01-03 14:41:38 -0800 |
---|---|---|
committer | Barton E. Schaefer <schaefer@zsh.org> | 2017-01-03 14:44:12 -0800 |
commit | c4dba4f2e654f40160ff97fdf691e9a33ea129b0 (patch) | |
tree | 8fa206420a3180457112c1009bef6ea1eafbd681 /Src | |
parent | d0f7a3b2d6abe48b705dbcde1c601e5224478bee (diff) | |
download | zsh-c4dba4f2e654f40160ff97fdf691e9a33ea129b0.tar.gz zsh-c4dba4f2e654f40160ff97fdf691e9a33ea129b0.tar.xz zsh-c4dba4f2e654f40160ff97fdf691e9a33ea129b0.zip |
users/22319: ${ary1:^ary2} should not change isarr state of expansion of ary1
Unless ary1 is made from a scalar, semantics of (@) in double quotes is lost.
Diffstat (limited to 'Src')
-rw-r--r-- | Src/subst.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Src/subst.c b/Src/subst.c index 64b440027..737a0a902 100644 --- a/Src/subst.c +++ b/Src/subst.c @@ -3066,7 +3066,10 @@ paramsubst(LinkList l, LinkNode n, char **str, int qt, int pf_flags, if (sval) zip = hmkarray(sval); } - if (!isarr) aval = mkarray(val); + if (!isarr) { + aval = mkarray(val); + isarr = 1; + } if (zip) { char **out; int alen, ziplen, outlen, i = 0; @@ -3089,7 +3092,6 @@ paramsubst(LinkList l, LinkNode n, char **str, int qt, int pf_flags, out[i*2] = NULL; aval = out; copied = 1; - isarr = 1; } } else { if (unset(UNSET)) { |