From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11998 invoked from network); 11 Oct 2007 09:04:51 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 11 Oct 2007 09:04:51 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 99134 invoked from network); 11 Oct 2007 09:04:44 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 11 Oct 2007 09:04:44 -0000 Received: (qmail 17723 invoked by alias); 11 Oct 2007 09:04:35 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 11987 Received: (qmail 17705 invoked from network); 11 Oct 2007 09:04:34 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 11 Oct 2007 09:04:34 -0000 Received: (qmail 97911 invoked from network); 11 Oct 2007 09:04:34 -0000 Received: from cluster-g.mailcontrol.com (85.115.41.190) by a.mx.sunsite.dk with SMTP; 11 Oct 2007 09:04:28 -0000 Received: from cameurexb01.EUROPE.ROOT.PRI ([62.189.241.200]) by rly09g.srv.mailcontrol.com (MailControl) with ESMTP id l9B8xsKr013796 for ; Thu, 11 Oct 2007 10:04:16 +0100 Received: from news01 ([10.103.143.38]) by cameurexb01.EUROPE.ROOT.PRI with Microsoft SMTPSVC(6.0.3790.1830); Thu, 11 Oct 2007 10:02:01 +0100 Date: Thu, 11 Oct 2007 10:02:00 +0100 From: Peter Stephenson To: zsh-users@sunsite.dk Subject: Re: Looking for devious one or two liner solutions to a problem Message-ID: <20071011100200.7ffb0197@news01> In-Reply-To: <071010204256.ZM28519@torch.brasslantern.com> References: <20071010163733.7875cee3.elessar@numenor.org> <071010203509.ZM28474@torch.brasslantern.com> <071010204256.ZM28519@torch.brasslantern.com> Organization: CSR X-Mailer: Claws Mail 3.0.0 (GTK+ 2.10.14; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 11 Oct 2007 09:02:01.0139 (UTC) FILETIME=[62B34030:01C80BE5] X-Scanned-By: MailControl A-07-08-10 (www.mailcontrol.com) on 10.71.0.119 On Wed, 10 Oct 2007 20:42:56 -0700 Bart Schaefer wrote: > On Oct 10, 8:35pm, Bart Schaefer wrote: > } f(){a=(${(s:.:)1});a[$2,3]=($[${a[$2]}+1] 0 0 0);a=${(j:.:)${a[0,3]}}} > > Hmm, I may have just found a parser bug. That doesn't work; you need > one more space or sem between the assignment and the closing brace: > > f(){a=(${(s:.:)1});a[$2,3]=($[${a[$2]}+1] 0 0 0);a=${(j:.:)${a[0,3]}};} I have a vague memory of that being deliberate: the closing brace must start a separate word on the command line. This is going back years, however (I think to Zoltan's period in charage). It's possible I'm remembering some other change to do with braces. -- Peter Stephenson Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070