From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19323 invoked from network); 7 Feb 2006 20:16:26 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.0 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 7 Feb 2006 20:16:26 -0000 Received: (qmail 42462 invoked from network); 7 Feb 2006 20:16:19 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 7 Feb 2006 20:16:19 -0000 Received: (qmail 28700 invoked by alias); 7 Feb 2006 20:16:16 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 22202 Received: (qmail 28690 invoked from network); 7 Feb 2006 20:16:16 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 7 Feb 2006 20:16:16 -0000 Received: (qmail 42104 invoked from network); 7 Feb 2006 20:16:15 -0000 Received: from mta07-winn.ispmail.ntl.com (81.103.221.47) by a.mx.sunsite.dk with SMTP; 7 Feb 2006 20:16:14 -0000 Received: from aamta10-winn.ispmail.ntl.com ([81.103.221.35]) by mta07-winn.ispmail.ntl.com with ESMTP id <20060207201613.RMQT19933.mta07-winn.ispmail.ntl.com@aamta10-winn.ispmail.ntl.com> for ; Tue, 7 Feb 2006 20:16:13 +0000 Received: from pwslaptop.csr.com ([81.105.238.64]) by aamta10-winn.ispmail.ntl.com with ESMTP id <20060207201613.KPTZ21315.aamta10-winn.ispmail.ntl.com@pwslaptop.csr.com> for ; Tue, 7 Feb 2006 20:16:13 +0000 Received: from pwslaptop.csr.com (pwslaptop.csr.com [127.0.0.1]) by pwslaptop.csr.com (8.13.4/8.13.4) with ESMTP id k17KFrRl003351 for ; Tue, 7 Feb 2006 20:15:53 GMT Received: from pwslaptop.csr.com (pws@localhost) by pwslaptop.csr.com (8.13.4/8.13.4/Submit) with ESMTP id k17KFpEY003348 for ; Tue, 7 Feb 2006 20:15:53 GMT Message-Id: <200602072015.k17KFpEY003348@pwslaptop.csr.com> X-Authentication-Warning: pwslaptop.csr.com: pws owned process doing -bs From: Peter Stephenson To: zsh-workers@sunsite.dk (Zsh hackers list) Subject: Re: parenthesis inside $(...) In-Reply-To: Your message of "Tue, 07 Feb 2006 19:53:59 GMT." <20060207195359.GB5015@sc> Date: Tue, 07 Feb 2006 20:15:51 +0000 Stephane Chazelas wrote: > $ zsh << \E > heredoc> echo $( > heredoc> case x in x) echo x;; esac > heredoc> ) > heredoc> E > zsh: parse error near `;;' > zsh: parse error near `)' Yes, it's known about (it's hinted at in the tip on page 314 of From Bash to Z Shell: Conquering the Command Line, by Oliver Kiddle, Jerry Peek and Peter Stephenson, Apress, ISBN 1 59059 376 6, in case anyone hasn't got around to buying that yet) and the general feeling when this came up here before was that it was pretty much inevitable. The right way of constructing a nested case is with balanced parentheses: echo $( case x in (x) echo x;; esac ) -- Peter Stephenson Web page still at http://www.pwstephenson.fsnet.co.uk/