From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6549 invoked from network); 15 Feb 2006 10:32:00 -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; 15 Feb 2006 10:32:00 -0000 Received: (qmail 11298 invoked from network); 15 Feb 2006 10:31:52 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 15 Feb 2006 10:31:52 -0000 Received: (qmail 4401 invoked by alias); 15 Feb 2006 10:31:46 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 22269 Received: (qmail 4321 invoked from network); 15 Feb 2006 10:31:45 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 15 Feb 2006 10:31:45 -0000 Received: (qmail 9695 invoked from network); 15 Feb 2006 10:31:43 -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; 15 Feb 2006 10:31:43 -0000 Received: by dot.blorf.net (Postfix, from userid 1000) id 9320A3507; Wed, 15 Feb 2006 02:31:41 -0800 (PST) Date: Wed, 15 Feb 2006 02:31:41 -0800 From: Wayne Davison To: Zsh hackers list Subject: Re: PATCH: fixing ${1+"$@"} when word-splitting Message-ID: <20060215103141.GA4882@dot.blorf.net> References: <20060211181440.GA30984@dot.blorf.net> <200602122026.k1CKQHGH003629@pwslaptop.csr.com> <20060213105349.GD31780@dot.blorf.net> <20060214071441.GA9931@dot.blorf.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060214071441.GA9931@dot.blorf.net> User-Agent: Mutt/1.5.11 One other minor fix that I noticed in my patched code affects a request for no-splitting when SH_WORD_SPLIT is enabled: setopt shwordsplit foo='1 2' print -l ${==foo+$foo} That used to split the variable $foo if it was not quoted (an interesting case where quotes made a difference in the old code). I've checked in my changes, including a couple new sentences in the zshexpn man page. If we decide that the change in splitting is undesirable after all, the following one-line change will put things back to the way they were before (except that the bug above will still be fixed): --- Src/subst.c 2006-02-15 01:58:31 -0800 +++ Src/subst.c 2006-02-15 02:03:41 -0800 @@ -2065,7 +2065,7 @@ multsub(&val, spbreak && !aspar, (aspar ? NULL : &aval), &isarr, NULL); opts[SHWORDSPLIT] = ws; copied = 1; - spbreak = 0; + /*spbreak = 0;*/ } break; case ':': Of course, we'd also need to change some of the D04 tests and the docs. ..wayne..