From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17420 invoked from network); 6 Apr 2000 17:21:24 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 6 Apr 2000 17:21:24 -0000 Received: (qmail 12939 invoked by alias); 6 Apr 2000 17:21:18 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10555 Received: (qmail 12930 invoked from network); 6 Apr 2000 17:21:18 -0000 Subject: Re: FPATH/autoload still strange in -dev-21 In-Reply-To: <1000406164211.ZM16541@candle.brasslantern.com> from Bart Schaefer at "Apr 6, 2000 04:42:11 pm" To: Bart Schaefer Date: Thu, 6 Apr 2000 18:21:10 +0100 (BST) CC: Zefram , zsh-workers@sunsite.auc.dk X-Mailer: ELM [version 2.4ME+ PL66 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-Id: From: Zefram Bart Schaefer wrote: >Hmm. "2>& foo" does indeed do so, but "2&> foo" only makes one copy. Is >that also expected? Hmm. It appears that "2&>" is treated as "2 &>" -- the "&>" isn't recognised as a redirection operator for the purposes of parsing the I/O number. % echo x 2&> foo % cat foo x 2 % echo x 2>& foo x % cat foo % Curiously enough, bash (2.03.0(1)) does the same thing. -zefram Index: ChangeLog =================================================================== RCS file: /cvsroot/zsh/zsh/ChangeLog,v retrieving revision 1.27 diff -c -r1.27 ChangeLog *** ChangeLog 2000/04/06 16:44:02 1.27 --- ChangeLog 2000/04/06 17:16:32 *************** *** 1,5 **** --- 1,9 ---- + 2000-04-06 Andrew Main + + * zefram2: Src/lex.c: Support "3&> foo" etc. + 2000-04-06 Andrew Main * 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. Index: Src/lex.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/lex.c,v retrieving revision 1.2 diff -c -r1.2 lex.c *** Src/lex.c 2000/04/04 01:16:25 1.2 --- Src/lex.c 2000/04/06 17:16:33 *************** *** 642,648 **** return DOUTPAR; } else if (idigit(c)) { /* handle 1< foo */ d = hgetc(); ! if (d == '>' || d == '<') { peekfd = c - '0'; c = d; } else { --- 642,659 ---- return DOUTPAR; } else if (idigit(c)) { /* handle 1< foo */ d = hgetc(); ! 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,707 **** --- 713,719 ---- else if (d == '!' || d == '|') return AMPERBANG; else if (d == '>') { + tokfd = peekfd; d = hgetc(); if (d == '!' || d == '|') return OUTANGAMPBANG; *************** *** 715,721 **** } hungetc(d); lexstop = 0; - tokfd = -1; return AMPOUTANG; } hungetc(d); --- 727,732 ----