From: Zoltan Hidvegi <hzoli@cs.elte.hu>
To: becker@atria.com
Cc: zsh-workers@math.gatech.edu
Subject: Re: zsh beta21 bug?: exec =()
Date: Thu, 20 Jun 1996 22:57:58 +0200 (MET DST) [thread overview]
Message-ID: <199606202057.WAA19049@bolyai.cs.elte.hu> (raw)
In-Reply-To: <9606201847.AA13914@phobos> from "Paul H. Becker" at "Jun 20, 96 02:47:58 pm"
>
> 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:
prev parent reply other threads:[~1996-06-20 21:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-06-20 18:47 Paul H. Becker
1996-06-20 20:57 ` Zoltan Hidvegi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=199606202057.WAA19049@bolyai.cs.elte.hu \
--to=hzoli@cs.elte.hu \
--cc=becker@atria.com \
--cc=zsh-workers@math.gatech.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).