From: Philippe Troin <phil@fifi.org>
To: Peter Stephenson <pws@pwstephenson.fsnet.co.uk>
Cc: zsh-workers@sunsite.auc.dk (Zsh hackers list)
Subject: Re: For loop bug
Date: 13 Sep 2002 17:58:34 -0700 [thread overview]
Message-ID: <871y7xs7yd.fsf@ceramic.fifi.org> (raw)
In-Reply-To: <20020913233156.324A31C0E9@pwstephenson.fsnet.co.uk>
Peter Stephenson <pws@pwstephenson.fsnet.co.uk> writes:
> Philippe Troin wrote:
> > Tried on zsh 4.0.4 and 4.0.6:
> >
> > % for i in 1 2 3; do echo $i || break; done && echo X
> > 1
> > X
> > 2
> > X
> > 3
> > X
> > X
> > %
> >
> > That looks somewhat incorrect...
>
> Oh, *yuk*.
>
> > Or did I miss something?
>
> Non, hélas.
>
> The wordcode is pretty horrific to debug: it's uncommented and as an
> unstructured array of integers completely opaque to all debugging tools.
> Tentative patch below --- passes all tests, including the new one (which
> Philippe will recognise). It's actually against 4.1, but I doubt if
> much has changed here.
>
> I may leave this till Monday for people to scratch their heads over.
Does it fix this one as well?
% for i in 1 2 3; do { {echo $i; [[ $i == 2 ]] && exit 1; } || break }; \
> done && echo X
1
X
%
I would have expected:
1
2
X
or
1
2
But surely not 1 X.
Phil.
next prev parent reply other threads:[~2002-09-14 0:58 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-13 18:25 Philippe Troin
2002-09-13 23:31 ` Peter Stephenson
2002-09-14 0:34 ` Bart Schaefer
2002-09-14 0:58 ` Philippe Troin [this message]
2002-09-14 4:56 ` Bart Schaefer
2002-09-16 4:58 ` Philippe Troin
2002-09-16 6:25 ` Bart Schaefer
2002-09-16 18:26 ` Philippe Troin
2002-09-16 20:46 ` Hans Dieter Pearcey
2002-09-17 0:08 ` Philippe Troin
2002-09-14 14:39 ` Peter Stephenson
2002-09-17 10:47 ` Peter Stephenson
2002-09-29 13:20 ` Sven Wischnowsky
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=871y7xs7yd.fsf@ceramic.fifi.org \
--to=phil@fifi.org \
--cc=pws@pwstephenson.fsnet.co.uk \
--cc=zsh-workers@sunsite.auc.dk \
/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).