diff options
author | Richard Hartmann <richih.mailinglist@gmail.com> | 2012-02-27 15:46:20 +0100 |
---|---|---|
committer | Richard Hartmann <richih.mailinglist@gmail.com> | 2012-02-27 15:46:20 +0100 |
commit | 54662155b1b342d5053b8b06e6cb57e88386c4a8 (patch) | |
tree | d616a565e7cee3ea205337bc5c89cdb7b3896262 /Src/subst.c | |
parent | 2edbe71a806dfafbce20eb17a996fefe8e380cfb (diff) | |
parent | db7d0ac34143ed2378c2fd98845b2ae5eaaf6bbb (diff) | |
download | zsh-54662155b1b342d5053b8b06e6cb57e88386c4a8.tar.gz zsh-54662155b1b342d5053b8b06e6cb57e88386c4a8.zip |
Merge branch 'upstream' into debian
Diffstat (limited to 'Src/subst.c')
-rw-r--r-- | Src/subst.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Src/subst.c b/Src/subst.c index 894f9cd2f..b9229861b 100644 --- a/Src/subst.c +++ b/Src/subst.c @@ -2693,7 +2693,12 @@ paramsubst(LinkList l, LinkNode n, char **str, int qt, int pf_flags) *idend = '\0'; val = dupstring(s); if (spsep || !arrasg) { - multsub(&val, PREFORK_NOSHWORDSPLIT, NULL, &isarr, NULL); + /* POSIX requires PREFORK_SINGLE semantics here, but + * traditional zsh used PREFORK_NOSHWORDSPLIT. Base + * behavior on caller choice of PREFORK_SHWORDSPLIT. */ + multsub(&val, + spbreak ? PREFORK_SINGLE : PREFORK_NOSHWORDSPLIT, + NULL, &isarr, NULL); } else { if (spbreak) split_flags = PREFORK_SPLIT|PREFORK_SHWORDSPLIT; |