Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

30242: use PREFORK_SINGLE for ${...=...} in POSIX emulation

  • Loading branch information...
commit 15138d4fb7a40a1276722924b0482f53c83468f3 1 parent 5f25bb8
Bart Schaefer authored
Showing with 14 additions and 4 deletions.
  1. +8 −3 ChangeLog
  2. +6 −1 Src/subst.c
View
11 ChangeLog
@@ -1,3 +1,8 @@
+2012-02-20 Barton E. Schaefer <schaefer@zsh.org>
+
+ * 30242: Src/subst.c: use PREFORK_SINGLE for the right-hand side
+ of ${...=...} when SH_WORD_SPLIT is in effect (POSIX emulation).
+
2012-02-19 Peter Stephenson <p.w.stephenson@ntlworld.com>
* unposted: Etc/Config.yo, Completion/X/Type/.distfiles,
@@ -67,8 +72,8 @@
2012-02-09 Barton E. Schaefer <schaefer@zsh.org>
- * 30193: ChangeLog Src/Zle/compcore.c: remnulargs() after poking
- into string in case length changes.
+ * 30193: Src/Zle/compcore.c: remnulargs() after poking into string
+ in case length changes.
2012-02-08 Peter Stephenson <pws@csr.com>
@@ -15995,5 +16000,5 @@
*****************************************************
* This is used by the shell to define $ZSH_PATCHLEVEL
-* $Revision: 1.5590 $
+* $Revision: 1.5591 $
*****************************************************
View
7 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;
Please sign in to comment.
Something went wrong with that request. Please try again.