diff options
| author | Peter Stephenson <pws@users.sourceforge.net> | 2008-03-14 11:40:57 +0000 |
|---|---|---|
| committer | Peter Stephenson <pws@users.sourceforge.net> | 2008-03-14 11:40:57 +0000 |
| commit | 948f015df0fee27f4e2c73b442a75c9434702550 (patch) | |
| tree | 0d28c6e4ad0bd849702de39e544c597634ff7283 /Src/parse.c | |
| parent | 24705: rationalise curses and term headers even more (diff) | |
| download | zsh-948f015df0fee27f4e2c73b442a75c9434702550.tar zsh-948f015df0fee27f4e2c73b442a75c9434702550.tar.gz zsh-948f015df0fee27f4e2c73b442a75c9434702550.tar.bz2 zsh-948f015df0fee27f4e2c73b442a75c9434702550.tar.lz zsh-948f015df0fee27f4e2c73b442a75c9434702550.tar.xz zsh-948f015df0fee27f4e2c73b442a75c9434702550.tar.zst 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.c | 6 |
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 |
