From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5882 invoked by alias); 17 Apr 2010 13:14:16 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 27877 Received: (qmail 24436 invoked from network); 17 Apr 2010 13:14:13 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.218.212 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:received:message-id:subject:from:to:cc:content-type; bh=KGshKIM+snxFZSRGJCUv4zyI9TCR5PoUU3IkEwNpfwc=; b=aHLKoAXc82zHt7ZMR5bAD+6D6v9dn37wg/8mE7xQpmj+9aG6ItBLy5N7cO/DBfDmGl WJ0j7eh6oyjExgt3sugDepJYUcLFm9FWsgNw1TxmPQl6FMEg/m/BBgngN5/OH5nUGdz5 R9LFp9Qx2ElmsafkBXYyWEAwDhHD0t/rYyCrY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=Owa/mHgZLasW5tqPXzpaJJdvOlZPPqQzvmm/yaDMgQmEV2tLql0Dkia+glOC8MIwM4 Dap2ukx0f04opdvg60STCkLB3rxochPdDz6wZ00beHd9VnSMkKOkCaTKwJLRaD0K553i DHtrXkaRSX01s1AfUW3pMJaZTYy6PeA5hjgTk= MIME-Version: 1.0 In-Reply-To: <20100409153754.76d0f6a6@news01> References: <100330224612.ZM1818@torch.brasslantern.com> <20100331060602.GA91691@redoubt.spodhuis.org> <100331081153.ZM2688@torch.brasslantern.com> <20100401082624.GA56998@redoubt.spodhuis.org> <100401073618.ZM10593@torch.brasslantern.com> <20100401215752.GA34619@redoubt.spodhuis.org> <100401155118.ZM11873@torch.brasslantern.com> <20100409153754.76d0f6a6@news01> Date: Sat, 17 Apr 2010 15:06:53 +0200 Message-ID: Subject: Re: Is this a bug? Why not? From: Mikael Magnusson To: Peter Stephenson Cc: zsh-workers@zsh.org Content-Type: text/plain; charset=UTF-8 On 9 April 2010 16:37, Peter Stephenson wrote: > On Thu, 01 Apr 2010 15:51:18 -0700 > Bart Schaefer wrote: >> On Apr 1, 2:57pm, Phil Pennock wrote: >> } Subject: Re: Is this a bug? Why not? >> } >> } > E.g., why doesn't the following cause $foo to be quoted? >> } > >> } > schaefer[516] ARGV0=sh Src/zsh >> } > $ foo="???" >> } > $ print ${foo+"$foo"} >> } > Doc Etc Src >> } > $ >> } > >> } > It works in bash. >> >> } Is this use-case important enough to warrant yet another option? >> >> Normally I'd be a stickler for not changing existing behavior, but in >> this case it looks so obviously like a bug in the way glob_subst is >> implemented that I'm not sure a new option is needed. > > I think that's correct. It might be as simple as this. > > Index: Src/subst.c > =================================================================== > RCS file: /cvsroot/zsh/zsh/Src/subst.c,v > retrieving revision 1.102 > diff -p -u -r1.102 subst.c > --- Src/subst.c 27 Mar 2010 19:04:36 -0000 1.102 > +++ Src/subst.c 9 Apr 2010 14:34:26 -0000 > @@ -2417,7 +2417,7 @@ paramsubst(LinkList l, LinkNode n, char > multsub(&val, spbreak && !aspar, (aspar ? NULL : &aval), &isarr, NULL); > opts[SHWORDSPLIT] = ws; > copied = 1; > - spbreak = 0; > + spbreak = globsubst = 0; > } > break; > case ':': This patch breaks at least cd ~-/ and anything using _pids for me. Reverting it on top of current cvs makes everything work again, found with git bisect. Frank confirmed he has the same problems with a recent build too. -- Mikael Magnusson