* Empty sublist in "if"
[not found] ` <20170212061455.GA4267@fujitsu.shahaf.local2>
@ 2017-02-12 18:30 ` Bart Schaefer
0 siblings, 0 replies; only message in thread
From: Bart Schaefer @ 2017-02-12 18:30 UTC (permalink / raw)
To: zsh-workers
On Feb 12, 6:14am, Daniel Shahaf wrote:
}
} % if false; then if true; fi
} % setopt noshortloops
} % if false; then if true; fi
} zsh: parse error near `fi'
}
} I'm guessing the second 'if' is parsed using the SHORT_LOOPS syntax,
} with an empty sublist. I'm not sure whether that's a bug: is the
} sublist in the SHORT_LOOPS syntax allowed to be null?
Hrm.
if true; then fi
works, so yes, the sublist is allowed to be empty. Still, the original
example seems a pretty questionable special case, and e.g. bash does
not allow an empty sublist there.
Of course zsh also allows empty braces and empty subshell parens, so ...
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-02-12 18:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <0befdb38-eaa5-6388-a3fe-58b1a73834b7@eastlink.ca>
[not found] ` <170211110437.ZM467@torch.brasslantern.com>
[not found] ` <ee3c8ad2-41e3-f3e4-9347-d6e395b85d8e__47549.2452657365$1486864527$gmane$org@eastlink.ca>
[not found] ` <20170212061455.GA4267@fujitsu.shahaf.local2>
2017-02-12 18:30 ` Empty sublist in "if" Bart Schaefer
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).