From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2832 invoked from network); 11 Feb 2006 18:14:52 -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; 11 Feb 2006 18:14:52 -0000 Received: (qmail 30533 invoked from network); 11 Feb 2006 18:14:47 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 11 Feb 2006 18:14:46 -0000 Received: (qmail 3968 invoked by alias); 11 Feb 2006 18:14:42 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 22229 Received: (qmail 3959 invoked from network); 11 Feb 2006 18:14:42 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 11 Feb 2006 18:14:42 -0000 Received: (qmail 30288 invoked from network); 11 Feb 2006 18:14:42 -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; 11 Feb 2006 18:14:40 -0000 Received: by dot.blorf.net (Postfix, from userid 1000) id 3B70C6105; Sat, 11 Feb 2006 10:14:40 -0800 (PST) Date: Sat, 11 Feb 2006 10:14:40 -0800 From: Wayne Davison To: Andrey Borzenkov Cc: Zsh-workers Subject: Re: [SOLVED] Libtool/zsh quoting problem: a zsh... bug? Message-ID: <20060211181440.GA30984@dot.blorf.net> References: <20060209233201.GA5875@fargo> <20060211093607.GD10579@DervishD> <200602111321.48602.arvidjaar@newmail.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200602111321.48602.arvidjaar@newmail.ru> User-Agent: Mutt/1.5.11 On Sat, Feb 11, 2006 at 01:21:43PM +0300, Andrey Borzenkov wrote: > See this thread: ; there > was an attempt to fix it in 16949 but apparently it was incomplete and never > went in. I just took a look at that code using Peter's old patch as a start, and the assertion that the quotes have been stripped out is not quite true: there are still Dnull and Snull characters remaining which indicate that there used to be a double- or single-quotes present. This allows us to check the string. An overly simple version is this: --- subst.c 6 Feb 2006 11:57:06 -0000 1.44 +++ subst.c 11 Feb 2006 18:07:23 -0000 @@ -2012,6 +2012,8 @@ paramsubst(LinkList l, LinkNode n, char */ multsub(&val, (aspar ? NULL : &aval), &isarr, NULL); copied = 1; + if (spbreak && (*s == Dnull || *s == Snull)) + spbreak = 0; } break; case ':': This will turn off word-splitting if the string started with a single or a double quote. This is incomplete because the arg may be something more complicated (such as: 'one' 'two' 'three four'), but it seems better than what we have now. One question I have is what to do about ${=1:"$@"}? In the patch above, I chose to let the double quotes override the '='. If that is not desired, change the new "if" to only trigger disallow an spbreak of 2: + if (spbreak == 1 && (*s == Dnull || *s == Snull)) ..wayne..