zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: Re: Long-option completion bug
Date: Fri, 4 Aug 2000 10:38:28 +0200 (MET DST)	[thread overview]
Message-ID: <200008040838.KAA27933@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: "Bart Schaefer"'s message of Fri, 4 Aug 2000 07:36:24 +0000


Bart Schaefer wrote:

> zagzig[300] ../zsh-3.1.6/configure --w<TAB>
> zagzig[300] ../zsh-3.1.6/configure ---zsh-mem-warning
>                                      ^
>                                      cursor here; too many hyphens.

Err...? The reported number of hyphens and the cursor position is
correct if you look at the possible completions:

  % ./configure --w<TAB>
  % ./configure ---zsh-mem-warning
  --disable-zsh-mem-warning   --enable-zsh-mem-warning


> This probably has something to do with my match specs.
> 
> zstyle ':completion:*' matcher-list \
>   '' 'r:|[._-,]=* r:|=*' 'm:{a-zA-Z}={A-Za-z} r:|[._-,]=* r:|=*' \
>   'r:|[._-,]=* r:|=* l:|=*'

That last one, of course, is the explanation why `--w' matches the
option at all (the leading two hyphens can be inserted because of the
`l:|=*').

> (Side note: I keep thinking I probably want ** instead of * in at least
> one of those, but I'm not sure which.)

Oh, a trick question. Hm, let's see. You won't want it in any of the
`r:|=*' nor in the `l:|=*' because that should give the same results.
So it can be only one of the other `r:...'s. Since using '' as the
first spec shows that you are careful, you probably don't want it in
the second match spec... 

Sorry ;-)


But look at those character classes. `[._-,]'. That means `.' and 
everything between and including `_' and `,'. Since '_' > ',', the
whole class is the same as `.'.


Bye
 Sven


--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


             reply	other threads:[~2000-08-04  8:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-08-04  8:38 Sven Wischnowsky [this message]
  -- strict thread matches above, loose matches on Subject: below --
2000-08-04  7:36 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=200008040838.KAA27933@beta.informatik.hu-berlin.de \
    --to=wischnow@informatik.hu-berlin.de \
    --cc=zsh-workers@sunsite.auc.dk \
    /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).