about summary refs log tree commit diff
path: root/Src/parse.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2008-03-14 11:40:57 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2008-03-14 11:40:57 +0000
commit948f015df0fee27f4e2c73b442a75c9434702550 (patch)
tree0d28c6e4ad0bd849702de39e544c597634ff7283 /Src/parse.c
parent2ca42b2025cceaabd64889aa3b932195e8d5720c (diff)
downloadzsh-948f015df0fee27f4e2c73b442a75c9434702550.tar.gz
zsh-948f015df0fee27f4e2c73b442a75c9434702550.tar.xz
zsh-948f015df0fee27f4e2c73b442a75c9434702550.zip
24711: fix re-presentation of here-documents munged internally
to here-strings
Diffstat (limited to 'Src/parse.c')
-rw-r--r--Src/parse.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/Src/parse.c b/Src/parse.c
index af3cba9d3..54543a642 100644
--- a/Src/parse.c
+++ b/Src/parse.c
@@ -1861,7 +1861,7 @@ par_redir(int *rp, char *idstring)
 void
 setheredoc(int pc, int type, char *str)
 {
-    ecbuf[pc] = WCB_REDIR(type);
+    ecbuf[pc] = WCB_REDIR(type | REDIR_FROM_HEREDOC_MASK);
     ecbuf[pc + 2] = ecstrcode(str);
 }
 
@@ -2409,6 +2409,10 @@ ecgetredirs(Estate s)
 	r->type = WC_REDIR_TYPE(code);
 	r->fd1 = *s->pc++;
 	r->name = ecgetstr(s, EC_DUP, NULL);
+	if (WC_REDIR_FROM_HEREDOC(code))
+	    r->flags = REDIRF_FROM_HEREDOC;
+	else
+	    r->flags = 0;
 	if (WC_REDIR_VARID(code))
 	    r->varid = ecgetstr(s, EC_DUP, NULL);
 	else