Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
For loop bug
- X-seq: zsh-workers 17662
- From: Philippe Troin <phil@xxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: For loop bug
- Date: 13 Sep 2002 11:25:37 -0700
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- Sender: Philippe Troin <phil@xxxxxxxx>
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...
Removing the "|| break" makes it work as expected:
% for i in 1 2 3; do echo $i; done && echo X
1
2
3
X
%
Same with grouping the echo and break statements:
% for i in 1 2 3; do {echo $i || break}; done && echo X
1
2
3
X
%
Or did I miss something?
Phil.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author