From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23398 invoked from network); 13 Feb 2006 18:09: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; 13 Feb 2006 18:09:26 -0000 Received: (qmail 86364 invoked from network); 13 Feb 2006 18:09:19 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 13 Feb 2006 18:09:19 -0000 Received: (qmail 27557 invoked by alias); 13 Feb 2006 18:09:17 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 22262 Received: (qmail 27548 invoked from network); 13 Feb 2006 18:09:16 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 13 Feb 2006 18:09:16 -0000 Received: (qmail 86061 invoked from network); 13 Feb 2006 18:09:12 -0000 Received: from cluster-d.mailcontrol.com (217.69.20.190) by a.mx.sunsite.dk with SMTP; 13 Feb 2006 18:09:11 -0000 Received: from exchange03.csr.com (uuk202166.uk.customer.alter.net [62.189.241.194] (may be forged)) by rly13d.srv.mailcontrol.com (MailControl) with ESMTP id k1DI96Tg020781 for ; Mon, 13 Feb 2006 18:09:08 GMT Received: from csr.com ([10.103.143.38]) by exchange03.csr.com with Microsoft SMTPSVC(5.0.2195.6713); Mon, 13 Feb 2006 18:09:06 +0000 To: Zsh hackers list Subject: Re: PATCH: fixing ${1+"$@"} when word-splitting In-reply-to: <20060213174338.GC6952@dot.blorf.net> References: <20060211181440.GA30984@dot.blorf.net> <200602122026.k1CKQHGH003629@pwslaptop.csr.com> <20060213105349.GD31780@dot.blorf.net> <20060213174338.GC6952@dot.blorf.net> Comments: In-reply-to Wayne Davison message dated "Mon, 13 Feb 2006 09:43:38 -0800." Date: Mon, 13 Feb 2006 18:08:57 +0000 From: Peter Stephenson Message-ID: X-OriginalArrivalTime: 13 Feb 2006 18:09:06.0897 (UTC) FILETIME=[9475AC10:01C630C8] Content-Type: text/plain MIME-Version: 1.0 X-Scanned-By: MailControl A-06-00-02 (www.mailcontrol.com) on 10.68.0.123 Wayne Davison wrote: > On Mon, Feb 13, 2006 at 11:34:38AM +0000, Peter Stephenson wrote: > > local IFS=.- > > print -l ${=1:-1.2} > [...] > > but now gives > > 1.2 > > This is due to the multi_isarr weirdness: when it is 0, multsub() > returns the resulting array joined with $IFS[0], which is what was > occurring here. I added this line to fix the problem: OK, thanks, that example now works, but unfortunately the saga continues... this still fails: % fn() { local IFS=.-; print -l ${=1:-$ZSH_VERSION}; } % fn 4.3.0-dev-3 which should also be split since $ZSH_VERSION isn't quoted. (This one's from is-at-least, too: it seems running "is-at-least 4.0" is a good test of word splitting.) I presume this is due to the truly horrible argument passing back from the lower levels. -- 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