From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17639 invoked by alias); 21 Aug 2010 17:05:06 -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: 28185 Received: (qmail 4888 invoked from network); 21 Aug 2010 17:04:59 -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.212.43 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=jhxqQr9MbJfpUFHUiJK3eHRTwvdAxNHx80OtLTGFVqE=; b=Q7ep3VQvZIbb6CoZ7tLPeoP/+u/BCs9k1L1CGi1CRUCbQuztr6+BZclq3WTA2qmaY/ hu8slJa5YNXep1SbA2mwpaXsgTnlocn2DJiz9ML4U1tiNTiuAWC1/YeWNbiP0i3QQqJc +wu8xZ+tohaHkWFAAQhOO3BiSPMBAxtWMAJ9g= 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 :content-type; b=RvshV6YH7SYcL9rFqnC8fOa7VcISthtlOLUPouJkIxQqfCQYNYZyZR7XtNdMVYawv6 DXCuR8x4IIFl89Ah/Z2laU6EOlwwhzC+PxOhmvOp/54fFQxZRtdX4fxWyYr6cdyXE1So R7TnTX2qML8Ic9wB+A+9ePTt2gTazUxh8sgko= MIME-Version: 1.0 In-Reply-To: <100821095410.ZM31747@torch.brasslantern.com> References: <1223938893-2537-1-git-send-email-joerg@alea.gnuu.de> <20081014150144.GA3836@alea.gnuu.de> <100821095410.ZM31747@torch.brasslantern.com> Date: Sat, 21 Aug 2010 19:04:55 +0200 Message-ID: Subject: Re: [PATCH] Quote components before using it is pattern From: Mikael Magnusson To: zsh workers Content-Type: text/plain; charset=UTF-8 On 21 August 2010 18:54, Bart Schaefer wrote: > On Aug 21, 2:46pm, Mikael Magnusson wrote: > } Subject: Re: [PATCH] Quote components before using it is pattern > } > } On 14 October 2008 17:01, Jorg Sommer wrote: > > Wow, digging back into history a bit here ... Not that much digging involved, git log **/_multi_parts showed this was the latest change, I tried undoing and it 'worked'. :) > } >> A component might contain a character active in patterns, like * or (). > } >> > } >> The characters in the temporary variable tmp1 must be quote, before the > } >> pattern is build with them. > } > } This patch sort of breaks completing when the first segment has spaces > } for me. > > As has come up elsewhere, the problem is that ${(q)...} is a bit too > aggressive for the purpose to which it is being put. We need to quote > pattern characters in tmp1, but not other characters like spaces. > > There's a rather ugly hunk of code in _path_files that does something > like this (see the comment "Explanation of substitution: ...") but > unfortunately I don't have time this morning to try to adapt it for > _multi_parts. I merrily thought "Oh, I'll take a look at it then", but of course I almost immediately exploded. I might try poking at it a bit later, when I've gathered all my pieces. -- Mikael Magnusson