Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Long-option completion bug
- X-seq: zsh-workers 12527
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: Long-option completion bug
- Date: Fri, 4 Aug 2000 10:38:28 +0200 (MET DST)
- In-reply-to: "Bart Schaefer"'s message of Fri, 4 Aug 2000 07:36:24 +0000
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
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@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author