zsh-workers
 help / color / mirror / code / Atom feed
From: Mikael Magnusson <mikachu@gmail.com>
To: zsh workers <zsh-workers@zsh.org>
Subject: Re: Quoting problems with _zip (unzip) completer
Date: Wed, 3 Feb 2010 02:16:15 +0100	[thread overview]
Message-ID: <237967ef1002021716l101c98b7obc758fb200a117e8@mail.gmail.com> (raw)
In-Reply-To: <20090817215819.796e9416@pws-pc>

On 17 August 2009 21:58, Peter Stephenson <p.w.stephenson@ntlworld.com> wrote:
> On Tue, 04 Aug 2009 09:50:59 +0100
> 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 value of "line" [in _zip] is a bit inconsistent.  Sure
>> enough if I use ~/tmp/zip/tmp\[.zip $line[1] comes back (using print -r) as
>>
>>   ~/tmp/zip/test[.zip
>>
>> which is wrong---either the ~ needs to be expanded, or the [ needs to be
>> quoted.  So this needs tracking internally, unfortunately.  If it hits
>> the internal completion quoting system we're probably stuck---I spent
>> weeks looking at that a couple of years ago and got virtually nowhere.
>> However, it may not be that bad in this case.
>
> It's inside comparguments, but luckily in only one place.  This removes
> the internal unquoting so the form above works.
>
> This could easily have knock-on effects in other callers of _arguments,
> however they should be fixable by simple local changes (and at least
> one case, the one above, works without updating, so others probably do,
> too), while with the old code there were unfixable cases, so I think we
> just need to identify them and change them as they come up.
>
> So please watch out for any anomalous _arguments quoting behaviour.

Hm, I can't remember if this fixed my original problem of not being
able to complete after unzip test\[.zip, if it did, something seems to
have broken it again. I do still have it in my "zsh-unfixed" dir so I
think it didn't. I don't get any errors, but I also don't get any
completions. (I actually encountered it when completing zdelattr,
which for some reason also uses $~, ah, you added that for me ;).

Long story short, if it was never fixed, never mind, I just want to
know if I'm getting senile. :)

--
Mikael Magnusson


  parent reply	other threads:[~2010-02-03  1:16 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 [this message]
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
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=237967ef1002021716l101c98b7obc758fb200a117e8@mail.gmail.com \
    --to=mikachu@gmail.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).