From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by melb.werple.net.au (8.7.5/8.7.3/2) with ESMTP id JAA07559 for ; Tue, 9 Jul 1996 09:53:40 +1000 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id TAA15033; Mon, 8 Jul 1996 19:49:17 -0400 (EDT) Resent-Date: Mon, 8 Jul 1996 19:47:13 -0400 (EDT) From: segal@morgan.com (Morris M. Siegel) Date: Mon, 8 Jul 1996 19:46:21 -0400 Message-Id: <9607081946.ZM7325@morgan.com> X-Mailer: Z-Mail (3.2.1 10oct95) To: zsh-users@math.gatech.edu Subject: Suggested "case" syntax extension Cc: segal@morgan.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"fUy8n3.0.Fg3.0uPun"@euclid> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/275 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu 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