Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Short `if'
- X-seq: zsh-workers 15258
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: Short `if'
- Date: Thu, 5 Jul 2001 15:59:34 +0200 (MET DST)
- In-reply-to: <Tc0a88d015490060f74@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
Peter Stephenson wrote:
> I can't get the short form of `if' to work, described in the manual as:
>
> if LIST SUBLIST
> A short form of the alternate `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
> % if true { print hello } # didn't expect this to work
> zsh: parse error near `}'
> 14:55% if true; { print hello } # shouldn't be dependent on shortloops(?)
> if> ^C
That's very peculiar. I don't know either, but
% if [[ -n x ]] echo hello
works.
Bye
Sven
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author