zsh-workers
 help / color / mirror / code / Atom feed
From: "Benjamin R. Haskell" <zsh@benizi.com>
To: Mikael Magnusson <mikachu@gmail.com>
Cc: Peter Stephenson <p.w.stephenson@ntlworld.com>,
	 zsh workers <zsh-workers@zsh.org>
Subject: Re: Quoting problems with _zip (unzip) completer
Date: Wed, 3 Feb 2010 18:21:14 -0500 (EST)	[thread overview]
Message-ID: <alpine.LNX.2.01.1002031820150.2729@hp.internal> (raw)
In-Reply-To: <alpine.LNX.2.01.1002031800060.2729@hp.internal>

On Wed, 3 Feb 2010, Benjamin R. Haskell wrote:

> On Wed, 3 Feb 2010, Mikael Magnusson wrote:
> 
> > >> > Peter Stephenson <pws@csr.com> 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


  reply	other threads:[~2010-02-03 23:21 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-03 20:15 Mikael Magnusson
2009-08-04  8:50 ` Peter Stephenson
2009-08-04 16:31   ` Mikael Magnusson
2009-08-17 20:58   ` Peter Stephenson
2009-08-17 21:49     ` Peter Stephenson
2009-08-17 21:59       ` Nikolai Weibull
2009-08-18  9:10         ` Peter Stephenson
2010-02-03  1:16     ` Mikael Magnusson
2010-02-03 22:09       ` Peter Stephenson
2010-02-03 22:43         ` Mikael Magnusson
2010-02-03 23:11           ` Benjamin R. Haskell
2010-02-03 23:21             ` Benjamin R. Haskell [this message]
2010-02-04 10:03           ` Peter Stephenson
2010-02-04 11:37         ` Peter Stephenson
2010-02-04 14:15           ` Benjamin R. Haskell
2010-02-04 14:22             ` Peter Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LNX.2.01.1002031820150.2729@hp.internal \
    --to=zsh@benizi.com \
    --cc=mikachu@gmail.com \
    --cc=p.w.stephenson@ntlworld.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).