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

RE: Short `if'



>
> What am I doing wrong?  I don't need it, I just need the code, manual and
> tests to be consistent.
>
> % setopt shortloops
> % if true; print hello
> if> ^C

This is not supposed to work (as long as I can believe docs), shortloops or
no shortloops.

> % if true { print hello }          # didn't expect this to work
> zsh: parse error near `}'

But this should, irrespectively of shortloops (if SUBLIST is of the form
`{ LIST }' or if the SHORT_LOOPS option is set)

> 14:55% if true; { print hello }    # shouldn't be dependent on
> shortloops(?)
> if> ^C
>

Ditto.

-andrej



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