zsh-workers
 help / color / mirror / code / Atom feed
* Long-option completion bug
@ 2000-08-04  7:36 Bart Schaefer
  0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2000-08-04  7:36 UTC (permalink / raw)
  To: zsh-workers

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

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:|=*'

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

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Long-option completion bug
@ 2000-08-04  8:38 Sven Wischnowsky
  0 siblings, 0 replies; 2+ messages in thread
From: Sven Wischnowsky @ 2000-08-04  8:38 UTC (permalink / raw)
  To: zsh-workers


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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2000-08-04  8:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-08-04  7:36 Long-option completion bug Bart Schaefer
2000-08-04  8:38 Sven Wischnowsky

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).