From b3f8e32e5cf5771eb5efb1e11c38dab377b14432 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Tue, 12 Apr 2005 15:11:07 +0000 Subject: 21133: New {myfd} syntax for allocating file descriptors --- Src/text.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'Src/text.c') 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('\"'); -- cgit 1.4.1