From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11317 invoked from network); 13 Nov 2008 14:53:18 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 13 Nov 2008 14:53:18 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 12585 invoked from network); 13 Nov 2008 14:53:14 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 13 Nov 2008 14:53:14 -0000 Received: (qmail 15655 invoked by alias); 13 Nov 2008 14:53:10 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 26037 Received: (qmail 15640 invoked from network); 13 Nov 2008 14:53:09 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 13 Nov 2008 14:53:09 -0000 Received: from cluster-d.mailcontrol.com (cluster-d.mailcontrol.com [217.69.20.190]) by bifrost.dotsrc.org (Postfix) with ESMTPS id D75778058FF0 for ; Thu, 13 Nov 2008 15:53:05 +0100 (CET) Received: from cameurexb01.EUROPE.ROOT.PRI ([193.128.72.68]) by rly03d.srv.mailcontrol.com (MailControl) with ESMTP id mADEr42o015769 for ; Thu, 13 Nov 2008 14:53:04 GMT Received: from news01.csr.com ([10.103.143.38]) by cameurexb01.EUROPE.ROOT.PRI with Microsoft SMTPSVC(6.0.3790.3959); Thu, 13 Nov 2008 14:53:04 +0000 Received: from news01.csr.com (localhost.localdomain [127.0.0.1]) by news01.csr.com (8.14.2/8.13.4) with ESMTP id mADEqxKG030859 for ; Thu, 13 Nov 2008 14:52:59 GMT Received: from csr.com (pws@localhost) by news01.csr.com (8.14.2/8.14.2/Submit) with ESMTP id mADEqx9i030855 for ; Thu, 13 Nov 2008 14:52:59 GMT Message-Id: <200811131452.mADEqx9i030855@news01.csr.com> X-Authentication-Warning: news01.csr.com: pws owned process doing -bs To: Zsh hackers list Subject: Re: [PATCH] Re: f() { ...; } > file In-reply-to: <20081113144212.GB5114@sc.homeunix.net> References: <20081105212036.GA4698@sc.homeunix.net> <20081113144212.GB5114@sc.homeunix.net> Comments: In-reply-to Stephane Chazelas message dated "Thu, 13 Nov 2008 14:42:12 +0000." Date: Thu, 13 Nov 2008 14:52:59 +0000 From: Peter Stephenson X-OriginalArrivalTime: 13 Nov 2008 14:53:04.0586 (UTC) FILETIME=[885072A0:01C9459F] X-Scanned-By: MailControl A_08_51_00 (www.mailcontrol.com) on 10.68.0.113 X-Virus-Scanned: ClamAV 0.92.1/8627/Thu Nov 13 10:42:40 2008 on bifrost X-Virus-Status: Clean Stephane Chazelas wrote: > The patch below seems to fix it. It just removes the special > case of f() { }. I don't why it was there in the first place. > rev 1.1 of parse.c already had it. That's because you've made all functions with braces parse as if they contain current shell structures; you'll see they're output with an unnecessary extra set of "{"s. This works because it just makes the code behave like the non-confusing way to do it, with the redirection inside the function. -- Peter Stephenson Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070