diff options
author | Bart Schaefer <barts@users.sourceforge.net> | 2012-02-20 17:50:39 +0000 |
---|---|---|
committer | Bart Schaefer <barts@users.sourceforge.net> | 2012-02-20 17:50:39 +0000 |
commit | 15138d4fb7a40a1276722924b0482f53c83468f3 (patch) | |
tree | c313e526de9f0cd381b9b0158c942376520457fe /Src | |
parent | 5f25bb8223d090d13af5869893fa35e5b8c44182 (diff) | |
download | zsh-15138d4fb7a40a1276722924b0482f53c83468f3.tar.gz zsh-15138d4fb7a40a1276722924b0482f53c83468f3.tar.xz zsh-15138d4fb7a40a1276722924b0482f53c83468f3.zip |
30242: use PREFORK_SINGLE for ${...=...} in POSIX emulation
Diffstat (limited to 'Src')
-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; |