zsh-users
 help / color / mirror / code / Atom feed
From: segal@morgan.com (Morris M. Siegel)
To: zsh-users@math.gatech.edu
Cc: segal@morgan.com
Subject: Suggested "case" syntax extension
Date: Mon, 8 Jul 1996 19:46:21 -0400	[thread overview]
Message-ID: <9607081946.ZM7325@morgan.com> (raw)

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



             reply	other threads:[~1996-07-08 23:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-07-08 23:46 Morris M. Siegel [this message]
1996-07-09  0:33 ` Zoltan Hidvegi
1996-07-09 20:09   ` Morris M. Siegel
1996-07-09 21:07     ` Zoltan Hidvegi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9607081946.ZM7325@morgan.com \
    --to=segal@morgan.com \
    --cc=zsh-users@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).