From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29913 invoked from network); 17 Aug 2009 21:59:59 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received: from new-brage.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.254.104) by ns1.primenet.com.au with SMTP; 17 Aug 2009 21:59:59 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 83928 invoked from network); 17 Aug 2009 21:59:53 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 17 Aug 2009 21:59:53 -0000 Received: (qmail 5676 invoked by alias); 17 Aug 2009 21:59:49 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 27220 Received: (qmail 5658 invoked from network); 17 Aug 2009 21:59:48 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 17 Aug 2009 21:59:48 -0000 Received: from mail-fx0-f221.google.com (mail-fx0-f221.google.com [209.85.220.221]) by bifrost.dotsrc.org (Postfix) with ESMTP id 9A60D8030868 for ; Mon, 17 Aug 2009 23:59:44 +0200 (CEST) Received: by fxm21 with SMTP id 21so2592777fxm.27 for ; Mon, 17 Aug 2009 14:59:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=05VxmCsPKvEkcf1cDyw1nzbUK7DPKIL8zKHD++hFLyU=; b=JANH4JvsdnXhqygNo3ZmUJilKVhdktbGuPEjGVy1UWlH04RcAT1G1vHYJWWrAkZRb6 kIWwKXPxYCmph4brR18WJrnjLDD+kiJ7ywl9TdiuP1WxLXNfEarnmitsQo0bZUULXRE0 I080CxuIp1/7fgfSh9nzsxjBb+kwxIzXaDdpc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=w0XAlIJfyWNk2b1skYBXYC/KdqPyQ86LAt3zfsWh6h2mZzHLKC2fHshIJypnSNPGHN PzU4WAX3qpJJ1YjLhppMjYCNB+0+pcLScsXrkHpfJNwb8upW4TvfCmxDS7fx8IW/RGDF zQuyMY2dUT3N8aoG5kw3X6cw7LgfEzFJuhh7g= MIME-Version: 1.0 Sender: nikolai.weibull@gmail.com Received: by 10.102.12.1 with SMTP id 1mr1488292mul.63.1250546384308; Mon, 17 Aug 2009 14:59:44 -0700 (PDT) In-Reply-To: <20090817224954.0b55b854@pws-pc> References: <237967ef0908031315u72fa3661i17ff7f0107b85b9c@mail.gmail.com> <200908040850.n748oxlc011862@news01.csr.com> <20090817215819.796e9416@pws-pc> <20090817224954.0b55b854@pws-pc> Date: Mon, 17 Aug 2009 23:59:44 +0200 X-Google-Sender-Auth: e678d74f80c4ca69 Message-ID: Subject: Re: Quoting problems with _zip (unzip) completer From: Nikolai Weibull To: Peter Stephenson Cc: zsh-workers Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: ClamAV 0.94.2/9706/Mon Aug 17 23:11:57 2009 on bifrost X-Virus-Status: Clean On Mon, Aug 17, 2009 at 23:49, Peter Stephenson wrote: > On Mon, 17 Aug 2009 21:58:19 +0100 > Peter Stephenson wrote: >> So please watch out for any anomalous _arguments quoting behaviour. > > Found one in _rm... but it's not a knock-on effect of this patch, it's > another thing that was already broken. > > =C2=A0rm stuff > > is supposed to exclude "stuff" from being completed again by using the > -F option to _files by together with the line from _arguments: > > =C2=A0 =C2=A0ignored=3D(${line//(#m)[\[\]()\\*?#<>~\^]/\\$MATCH}) > =C2=A0 =C2=A0_files -F ignored && ret=3D0 > > However, the code for "_files -F " was > broken: =C2=A0instead of appending the contents of after the -F t= o > the contents of the existing array, it appended the name . Great! > (I'm not *quite* sure how this works, actually. =C2=A0The extra quoting s= hown > in the code above protects pattern characters, since we're actually > passing a pattern, not a file name, so 'foo\[bar' from line becomes > 'foo\\\[bar'. =C2=A0Unquoting the pattern characters gives 'foo\[bar' bac= k as > a literal match. =C2=A0I don't understand why this matches the file... = =C2=A0I'm > going to pretend I didn't notice.) I don't want to sound pessimistic, but aren't we approaching a point where the quoting and pattern matching code simply has to be re(written|factored)? I'm not volunteering, but it seems that more or less every bug fix goes something like "OK, I'm not sure what this code is supposed to do, but it seems to work if we do X first". Who wrote the quoting and pattern matching code? Was it Sven? Is he not available to document this kind of stuff any longer? I hope I don't sound critical of the development process. I have no right to be. I just thought I'd mention my observation, seeing as I failed to do so for the one below. > I'm a bit surprised nobody noticed this wasn't working. =C2=A0If anyone f= inds > this has a negative rather an a positive effect on ignoring files in > "rm" completion, please try to reproduce it starting from "zsh -f". I must confess that I had noticed it, but ignored it, figuring that my code was broken and that it had been fixed in CVS. I should have investigated this, and for not doing so I apologize.