diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | Src/lex.c | 15 |
2 files changed, 17 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog index 6ec933d9c..58ed4c8df 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2000-04-06 Andrew Main <zefram@zsh.org> + * zefram2: Src/lex.c: Support "3&> foo" etc. + +2000-04-06 Andrew Main <zefram@zsh.org> + * zefram1: configure.in, Etc/zsh-development-guide: List of tools required for development work, and a little more conspicuous explanation of the config.status hack. diff --git a/Src/lex.c b/Src/lex.c index 2c19c097e..ccd04b2d9 100644 --- a/Src/lex.c +++ b/Src/lex.c @@ -642,7 +642,18 @@ gettok(void) return DOUTPAR; } else if (idigit(c)) { /* handle 1< foo */ d = hgetc(); - if (d == '>' || d == '<') { + if(d == '&') { + d = hgetc(); + if(d == '>') { + peekfd = c - '0'; + hungetc('>'); + c = '&'; + } else { + hungetc(d); + lexstop = 0; + hungetc('&'); + } + } else if (d == '>' || d == '<') { peekfd = c - '0'; c = d; } else { @@ -702,6 +713,7 @@ gettok(void) else if (d == '!' || d == '|') return AMPERBANG; else if (d == '>') { + tokfd = peekfd; d = hgetc(); if (d == '!' || d == '|') return OUTANGAMPBANG; @@ -715,7 +727,6 @@ gettok(void) } hungetc(d); lexstop = 0; - tokfd = -1; return AMPOUTANG; } hungetc(d); |