zsh-users
 help / color / mirror / code / Atom feed
* Suggested "case" syntax extension
@ 1996-07-08 23:46 Morris M. Siegel
  1996-07-09  0:33 ` Zoltan Hidvegi
  0 siblings, 1 reply; 4+ messages in thread
From: Morris M. Siegel @ 1996-07-08 23:46 UTC (permalink / raw)
  To: zsh-users; +Cc: segal

Newer versions of ksh allow an optional '(' before each pattern in a case
statement, complementary to the mandatory ')' following the pattern.  As
well as being esthetically symmetric, this also facilitates verifying that
a shell script has balanced parentheses (e.g. with the '%' command in vi).

It seems that zsh still recognizes only the classic Bourne shell syntax for
"case", with the ')' but no optional '('.  Considering all the syntactic
variation zsh supports, it would be quite reasonable for zsh to allow a
leading '(', thereby enhancing compatibility with ksh scripts.  Although
I have not looked into the zsh source, I imagine this should not pose an
implementation problem.

-- Morrie Siegel



edit



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1996-07-09 21:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-07-08 23:46 Suggested "case" syntax extension Morris M. Siegel
1996-07-09  0:33 ` Zoltan Hidvegi
1996-07-09 20:09   ` Morris M. Siegel
1996-07-09 21:07     ` Zoltan Hidvegi

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).