* zsh beta21 bug?: exec =()
@ 1996-06-20 18:47 Paul H. Becker
1996-06-20 20:57 ` Zoltan Hidvegi
0 siblings, 1 reply; 2+ messages in thread
From: Paul H. Becker @ 1996-06-20 18:47 UTC (permalink / raw)
To: zsh-workers
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]
--thanks for your work on a great shell
------------------------------------------------------------------------------
Paul Becker o Atria Software main: 617-676-2400
(617)676-2605 /~> 20 Maguire Road fax: 617-676-2640
becker@Atria.com o...(\ Lexington, MA 02173 http://www.atria.com/
----------------- ~~~~~~~~~~ -----------------------------------------------
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: zsh beta21 bug?: exec =()
1996-06-20 18:47 zsh beta21 bug?: exec =() Paul H. Becker
@ 1996-06-20 20:57 ` Zoltan Hidvegi
0 siblings, 0 replies; 2+ messages in thread
From: Zoltan Hidvegi @ 1996-06-20 20:57 UTC (permalink / raw)
To: becker; +Cc: zsh-workers
>
> 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:
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1996-06-20 21:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-06-20 18:47 zsh beta21 bug?: exec =() Paul H. Becker
1996-06-20 20:57 ` Zoltan Hidvegi
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).