mirror of
git://git.code.sf.net/p/zsh/code
synced 2026-01-01 20:11:06 +01:00
21133: New {myfd} syntax for allocating file descriptors
This commit is contained in:
parent
bd718425bb
commit
b3f8e32e5c
7 changed files with 256 additions and 60 deletions
|
|
@ -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('\"');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue