Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zsh beta21 bug?: exec =()
- X-seq: zsh-workers 1389
- From: Zoltan Hidvegi <hzoli@xxxxxxxxxx>
- To: becker@xxxxxxxxx
- Subject: Re: zsh beta21 bug?: exec =()
- Date: Thu, 20 Jun 1996 22:57:58 +0200 (MET DST)
- Cc: zsh-workers@xxxxxxxxxxxxxxx
- In-reply-to: <9606201847.AA13914@phobos> from "Paul H. Becker" at "Jun 20, 96 02:47:58 pm"
- Organization: Dept. of Comp. Sci., Eotvos University, Budapest, Hungary
- Phone: (36 1)2669833 ext: 2667, home phone: (36 1) 2752368
>
> This worked with all previous beta version of zsh, but fails
> with beta 21...
>
> % cat ztest
>
> exec 3< =(ls -C)
> while read line <&3
> do
> echo "line = $line"
> done
> exec 3<&-
>
> % zsh-2.6b21 ztest
> ztest: parse error [2]
> ztest: 3: bad file number [3]
I think that < =(...) is useless since it is really the same as < <(...).
But now I see that it can be useful sometimes so the patch below enables it
again. But the above script can be rewritten:
coproc ls -C
while read -p line
do
echo "line = $line"
done
Zoltan
*** Src/parse.c 1996/06/20 20:31:54 2.12
--- Src/parse.c 1996/06/20 20:39:58
***************
*** 1225,1231 ****
if (toks[0] == Outang && toks[1] == Inpar)
/* > >(...) */
fn->type = OUTPIPE;
! else if ((toks[0] == Inang || toks[0] == Equals) && toks[1] == Inpar)
YYERRORV;
break;
--- 1225,1231 ----
if (toks[0] == Outang && toks[1] == Inpar)
/* > >(...) */
fn->type = OUTPIPE;
! else if (toks[0] == Inang && toks[1] == Inpar)
YYERRORV;
break;
***************
*** 1233,1239 ****
if (toks[0] == Inang && toks[1] == Inpar)
/* < <(...) */
fn->type = INPIPE;
! else if ((toks[0] == Outang || toks[0] == Equals) && toks[1] == Inpar)
YYERRORV;
break;
case READWRITE:
--- 1233,1239 ----
if (toks[0] == Inang && toks[1] == Inpar)
/* < <(...) */
fn->type = INPIPE;
! else if (toks[0] == Outang && toks[1] == Inpar)
YYERRORV;
break;
case READWRITE:
Messages sorted by:
Reverse Date,
Date,
Thread,
Author