Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Parse error (lack thereof) on incomplete loops



On Thu, Oct 4, 2018 at 9:32 AM Peter Stephenson
<p.stephenson@xxxxxxxxxxx> wrote:
>
> On Thu, 2018-10-04 at 08:49 -0700, Bart Schaefer wrote:
>
> > % { while false
> > cursh while> }
> > %
> >
> > This indicates a parsing problem in 5.6
>
> It affects for, repeat, until and if, too, and isn't hard to turn back
> into a parse error.

How did it stop being a parse error in the first place?

> However, I'm very far from convinced this is actually a bug.  If you
> turn off SHORT_LOOPS you'll find you get the error back

My problem with it is that it's not consistent.

set -x
{ while false
while false
}

The shell is now in an infinite loop executing "false".  Can this
really be intentional?



Messages sorted by: Reverse Date, Date, Thread, Author