From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23120 invoked by alias); 3 Feb 2010 23:11: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: 27655 Received: (qmail 26426 invoked from network); 3 Feb 2010 23:11:15 -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-SPF: none (ns1.primenet.com.au: domain at benizi.com does not designate permitted sender hosts) Date: Wed, 3 Feb 2010 18:11:11 -0500 (EST) From: "Benjamin R. Haskell" To: Mikael Magnusson cc: Peter Stephenson , zsh workers Subject: Re: Quoting problems with _zip (unzip) completer In-Reply-To: <237967ef1002031443u32df6971x842e3453a1307375@mail.gmail.com> Message-ID: References: <237967ef0908031315u72fa3661i17ff7f0107b85b9c@mail.gmail.com> <200908040850.n748oxlc011862@news01.csr.com> <20090817215819.796e9416@pws-pc> <237967ef1002021716l101c98b7obc758fb200a117e8@mail.gmail.com> <20100203220958.26bc25fe@pws-pc> <237967ef1002031443u32df6971x842e3453a1307375@mail.gmail.com> User-Agent: Alpine 2.01 (LNX 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Wed, 3 Feb 2010, Mikael Magnusson wrote: > >> > Peter Stephenson wrote: > >> >> Mikael Magnusson wrote: > >> >> > % unzip test\[.zip > >> >> > _zip:117: bad pattern: test[.zip(|.zip|.ZIP) > >> >> > _zip:117: bad pattern: test[.zip(|.zip|.ZIP) > >> >> > _zip:117: bad pattern: test[.zip(|.zip|.ZIP) > > > > The exact test above is currently working for me, with my default > > completion setup. > > As in, if that is an actual zip file with files in it, you get a > listing of those files? > > Breaks for me w/ latest git. Changing _zip line 117: from zipfile=( $~line[1](|.zip|.ZIP) ) to zipfile=( $line[1](|.zip|.ZIP) ) fixes the 'test[.zip' case, but renaming 'test[.zip' to '*.zip' shows a weirder problem (present w/ or w/o the change): $ unzip '*.zip' 3 archives were successfully processed. [Contents of a.zip] The '3' comes from 'a.zip', 'test[.zip', and '*.zip' $ cp a.zip b.zip $ unzip '*.zip' 4 archives were successfully processed. [Contents of a.zip] Even more interesting is that '*.zip' doesn't need to exist. :-) Contents appear to be the first .zip in alpha order. unzip -v UnZip 6.00 of 20 April 2009, by Info-ZIP.[...] (more version info available if needed) -- Best, Ben