From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11518 invoked from network); 4 Jun 2007 09:49:24 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00 autolearn=no version=3.2.0 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 4 Jun 2007 09:49:24 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 26507 invoked from network); 4 Jun 2007 09:49:18 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 4 Jun 2007 09:49:18 -0000 Received: (qmail 22805 invoked by alias); 4 Jun 2007 09:49:15 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 23517 Received: (qmail 22796 invoked from network); 4 Jun 2007 09:49:14 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 4 Jun 2007 09:49:14 -0000 Received: (qmail 26217 invoked from network); 4 Jun 2007 09:49:14 -0000 Received: from cluster-c.mailcontrol.com (168.143.177.190) by a.mx.sunsite.dk with SMTP; 4 Jun 2007 09:49:07 -0000 Received: from cameurexb01.EUROPE.ROOT.PRI ([62.189.241.200]) by rly06c.srv.mailcontrol.com (MailControl) with ESMTP id l549n24Q008112 for ; Mon, 4 Jun 2007 10:49:03 +0100 Received: from news01.csr.com ([10.103.143.38]) by cameurexb01.EUROPE.ROOT.PRI with Microsoft SMTPSVC(6.0.3790.1830); Mon, 4 Jun 2007 10:49:02 +0100 Date: Mon, 4 Jun 2007 10:49:01 +0100 From: Peter Stephenson To: "zsh workers" Subject: Re: Change in FIGNORE behavior Message-ID: <20070604104901.276f7d83@news01.csr.com> In-Reply-To: <20070530135436.410e11ff@news01.csr.com> References: <20a807210705291856qe306eeds250f4f9d5f4dd33f@mail.gmail.com> <200705300945.l4U9jUbE009607@news01.csr.com> <20070530112934.3950357b@news01.csr.com> <070530035810.ZM29792@torch.brasslantern.com> <200705301127.l4UBROR5010814@news01.csr.com> <20070530135436.410e11ff@news01.csr.com> Organization: CSR X-Mailer: Claws Mail 2.9.1 (GTK+ 2.10.8; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 04 Jun 2007 09:49:02.0159 (UTC) FILETIME=[94DEFDF0:01C7A68D] X-Scanned-By: MailControl A-07-07-05 (www.mailcontrol.com) on 10.67.0.116 On Wed, 30 May 2007 13:54:36 +0100 Peter Stephenson wrote: > Index: Doc/Zsh/params.yo > =================================================================== > RCS file: /cvsroot/zsh/zsh/Doc/Zsh/params.yo,v > retrieving revision 1.37 > diff -u -r1.37 params.yo > --- Doc/Zsh/params.yo 21 May 2007 09:30:25 -0000 1.37 > +++ Doc/Zsh/params.yo 30 May 2007 12:50:00 -0000 > @@ -234,7 +234,10 @@ > Like `tt(r)', but gives the last match. For associative arrays, > gives all possible matches. May be used for assigning to ordinary > array elements, but not for assigning to associative arrays. > -On failure the empty string is returned. > +On failure the empty string is returned for a single match; any > +time a valid subscript is needed (for example, on an assignment > +to a failed element, or in a subscript range) the subscript is > +treated as the location of the first element. > ) > item(tt(i))( > Like `tt(r)', but gives the index of the match instead; this may not Any strong reaction to this further change for (R)? I'm tempted to put it in in the hope it's the best of a bad job. I think the ideal case would be that a failed (R) returned an index off the beginning of the array. This would make it symmetrical with (r), would make ranges work sensibly, and would make an assignment on failure prepend the quantity being assigned (rather than override the first element, which is pretty gross). However, with the kludge for index 0 as a poor person's KSH_ARRAYS, and negative numbers counting from the end, there is no index that's off the start. The combination of (R) returning an empty element if it's returning an element, and the start of the array if it's being used as an index, including the case of ranges and assignments (and, as it will no doubt turn out, roads, schools, aqueducts, ...) mimics that to some extent. -- Peter Stephenson Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070 To access the latest news from CSR copy this link into a web browser: http://www.csr.com/email_sig.php To get further information regarding CSR, please visit our Investor Relations page at http://ir.csr.com/csr/about/overview