zsh-users
 help / color / mirror / code / Atom feed
From: Danek Duvall <duvall@comfychair.org>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: zsh-users@zsh.org
Subject: Re: completion oddity
Date: Tue, 22 May 2012 16:06:46 -0700	[thread overview]
Message-ID: <20120522230646.GD10763@lorien.comfychair.org> (raw)
In-Reply-To: <120521233507.ZM1136@torch.brasslantern.com>

On Mon, May 21, 2012 at 11:35:07PM -0700, Bart Schaefer wrote:

> On May 21, 10:01pm, Danek Duvall wrote:
> }
> } I did a quick test with the matcher-list zstyle, though, but couldn't
> } get it to work (without the -M "" in _k).
> 
> Two things ...
> 
> }     zstyle ":completion::complete:k::" matcher-list ""
> 
> (1) The matcher-list is looked up very early in completion.  The context
> isn't yet this specific at that point.  (I think this is in the FAQ.)
> 
> }     zstyle ":completion:*" matcher-list ""
> 
> The matcher-list style is only used when it is not empty!
> 
> _description: [[ -n "$_matcher" ]] && opts=($opts -M "$_matcher")
> 
> So you can't use matcher-list to turn off matching, only to modify it.

So if I set up my own style processing in order to override this behavior
(both the earliness and the use of the empty value) as you suggested to
Greg, would it be kosher to use the matcher-list style, or would I want to
use my own style name?

> }     gtar --show--names<TAB>
> } 
> } and it beeps and moves me to between the second double-hyphen, then after
> } another beep, starts cycling between the two.  If I just have "--show"
> } there, then it ends up cycling among four alternatives.
> 
> Do all four alternatives have the same number of hyphens?

No; three have two, one has one:

    --show-defaults
    --show-omitted-dirs
    --show-transformed-names
    --show-stored-names

I'm still trying to formulate a question about why the default behavior
here is user friendly, but I'm having trouble.  I can understand the logic
of each step, but it doesn't seem like it's the right thing overall.

Thanks,
Danek


  parent reply	other threads:[~2012-05-22 23:06 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-21 21:40 Danek Duvall
2012-05-22  2:42 ` Bart Schaefer
2012-05-22  5:01   ` Danek Duvall
2012-05-22  5:16     ` Danek Duvall
2012-05-22  6:35       ` Bart Schaefer
2012-05-22 16:35         ` Greg Klanderman
2012-05-22 22:30           ` Bart Schaefer
2012-05-22 22:55             ` Greg Klanderman
2012-05-22 23:06         ` Danek Duvall [this message]
2012-06-15 10:43       ` #conpdef and compadd Eric Smith
2012-06-15 11:06         ` Mikael Magnusson
2012-06-15 19:22           ` #conpdef and compadd -> command regex Eric Smith
2012-06-15 22:22             ` Mikael Magnusson
2012-05-22 16:18   ` completion oddity Greg Klanderman
2012-05-22 22:57     ` Bart Schaefer
2012-05-22 23:09       ` Greg Klanderman
2012-05-23  6:08         ` Bart Schaefer
2012-05-23  1:03       ` Danek Duvall
2012-05-23  6:31         ` Bart Schaefer
2012-05-26 21:19           ` Danek Duvall
2012-05-23  6:25     ` Bart Schaefer
2012-05-23 18:48       ` Greg Klanderman
2012-05-24  3:39         ` Bart Schaefer

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=20120522230646.GD10763@lorien.comfychair.org \
    --to=duvall@comfychair.org \
    --cc=schaefer@brasslantern.com \
    --cc=zsh-users@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).