From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12316 invoked from network); 13 Feb 2006 17:43:49 -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 17:43:49 -0000 Received: (qmail 18841 invoked from network); 13 Feb 2006 17:43:43 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 13 Feb 2006 17:43:43 -0000 Received: (qmail 14030 invoked by alias); 13 Feb 2006 17:43:40 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 22261 Received: (qmail 14021 invoked from network); 13 Feb 2006 17:43:39 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 13 Feb 2006 17:43:39 -0000 Received: (qmail 18547 invoked from network); 13 Feb 2006 17:43:39 -0000 Received: from dsl3-63-249-88-2.cruzio.com (HELO dot.blorf.net) (63.249.88.2) by a.mx.sunsite.dk with SMTP; 13 Feb 2006 17:43:38 -0000 Received: by dot.blorf.net (Postfix, from userid 1000) id 81568480E; Mon, 13 Feb 2006 09:43:38 -0800 (PST) Date: Mon, 13 Feb 2006 09:43:38 -0800 From: Wayne Davison To: Peter Stephenson Cc: Zsh hackers list Subject: Re: PATCH: fixing ${1+"$@"} when word-splitting Message-ID: <20060213174338.GC6952@dot.blorf.net> References: <20060211181440.GA30984@dot.blorf.net> <200602122026.k1CKQHGH003629@pwslaptop.csr.com> <20060213105349.GD31780@dot.blorf.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.11 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: --- Src/subst.c 2006-02-13 09:25:18.000000000 -0800 +++ Src/subst.c 2006-02-13 09:30:33.000000000 -0800 @@ -347,6 +347,7 @@ if (!*x) break; insertlinknode(&foo, n, (void *)x), incnode(n); + mult_isarr = 1; } switch (c) { case Dnull: This makes sure that when we split the string into multiple pieces before parsing it, it will be returned as an array. ..wayne..