summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2017-05-08 10:54:08 +0100
committerPeter Stephenson <pws@zsh.org>2017-05-08 10:54:08 +0100
commitf25d01a97c61fdac5d6e0a6a8fb63b5b2b5f3393 (patch)
treece13fa223142a4c22541e6df4aee8ac7b50ae9cf /Src
parentaa8157b463c18489b378da322f46574bd9ab8dbb (diff)
downloadzsh-f25d01a97c61fdac5d6e0a6a8fb63b5b2b5f3393.tar.gz
zsh-f25d01a97c61fdac5d6e0a6a8fb63b5b2b5f3393.tar.xz
zsh-f25d01a97c61fdac5d6e0a6a8fb63b5b2b5f3393.zip
Fix combination of HERE document and |&.
A missing flag setting up the HERE document mean that the size
of the wordcode needed to append the 2>&1 was counted incorrectly,
so the resulting wordcode was garbled.

Add test.
Diffstat (limited to 'Src')
-rw-r--r--Src/parse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Src/parse.c b/Src/parse.c
index 6fe283dcb..83e87afed 100644
--- a/Src/parse.c
+++ b/Src/parse.c
@@ -2143,7 +2143,7 @@ par_redir(int *rp, char *idstring)
 	 * the definition of WC_REDIR_WORDS. */
 	ecispace(r, ncodes);
 	*rp = r + ncodes;
-	ecbuf[r] = WCB_REDIR(type);
+	ecbuf[r] = WCB_REDIR(type | REDIR_FROM_HEREDOC_MASK);
 	ecbuf[r + 1] = fd1;
 
 	/*