Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Quoting problems with _zip (unzip) completer
- X-seq: zsh-workers 27656
- From: "Benjamin R. Haskell" <zsh@xxxxxxxxxx>
- To: Mikael Magnusson <mikachu@xxxxxxxxx>
- Subject: Re: Quoting problems with _zip (unzip) completer
- Date: Wed, 3 Feb 2010 18:21:14 -0500 (EST)
- Cc: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>, zsh workers <zsh-workers@xxxxxxx>
- In-reply-to: <alpine.LNX.2.01.1002031800060.2729@xxxxxxxxxxx>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <237967ef0908031315u72fa3661i17ff7f0107b85b9c@xxxxxxxxxxxxxx> <200908040850.n748oxlc011862@xxxxxxxxxxxxxx> <20090817215819.796e9416@pws-pc> <237967ef1002021716l101c98b7obc758fb200a117e8@xxxxxxxxxxxxxx> <20100203220958.26bc25fe@pws-pc> <237967ef1002031443u32df6971x842e3453a1307375@xxxxxxxxxxxxxx> <alpine.LNX.2.01.1002031800060.2729@xxxxxxxxxxx>
On Wed, 3 Feb 2010, Benjamin R. Haskell wrote:
> On Wed, 3 Feb 2010, Mikael Magnusson wrote:
>
> > >> > Peter Stephenson <pws@xxxxxxx> wrote:
> > >> >> Mikael Magnusson wrote:
> > >> >> > % unzip test\[.zip <tab>
> > >> >> > _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' <TAB>
> 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' <TAB>
> 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)
>
More importantly:
ZipInfo 3.00 of 20 April 2009, by Greg Roelofs and the Info-ZIP group.
[...]
"file[.zip]" may be a wildcard name containing *, ?, [] (e.g., "[a-j]*.zip").
--
Best,
Ben
Messages sorted by:
Reverse Date,
Date,
Thread,
Author