summaryrefslogtreecommitdiff
path: root/Src/text.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/text.c')
-rw-r--r--Src/text.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/Src/text.c b/Src/text.c
index f7d80ae73..ceb4bfdf4 100644
--- a/Src/text.c
+++ b/Src/text.c
@@ -789,10 +789,15 @@ getredirs(LinkList redirs)
case REDIR_MERGEOUT:
case REDIR_INPIPE:
case REDIR_OUTPIPE:
- if (f->fd1 != (IS_READFD(f->type) ? 0 : 1))
+ if (f->varid) {
+ taddchr('{');
+ taddstr(f->varid);
+ taddchr('}');
+ } else if (f->fd1 != (IS_READFD(f->type) ? 0 : 1))
taddchr('0' + f->fd1);
taddstr(fstr[f->type]);
- taddchr(' ');
+ if (f->type != REDIR_MERGEIN && f->type != REDIR_MERGEOUT)
+ taddchr(' ');
if (f->type == REDIR_HERESTR) {
if (has_token(f->name)) {
taddchr('\"');