zsh-workers
 help / color / mirror / code / Atom feed
* Re: Some problem with completion matching
@ 2000-12-14  7:18 Sven Wischnowsky
  2000-12-14  8:29 ` Andrej Borsenkow
  0 siblings, 1 reply; 4+ messages in thread
From: Sven Wischnowsky @ 2000-12-14  7:18 UTC (permalink / raw)
  To: zsh-workers


Bart Schaefer wrote:

> On Dec 13,  6:52pm, Andrej Borsenkow wrote:
> } 
> } bor@itsrm2% l ntpd/*.c
> } ntpd/check_y2k.c            ntpd/map_vme.c
> } ntpd/ntp_config.c           ntpd/ntp_control.c
> } ntpd/ntp_crypto.c           ntpd/ntp_filegen.c
> } ..... etc
> } bor@itsrm2% l ntpd/.cTAB
> } bor@itsrm2% l ntpd/ntpd.c
> } Completing file
> } ntpd.c      version.c
> } 
> } ???
> } 
> } bor@itsrm2% zstyle -L
> } zstyle ':completion:*' matcher-list '' 'm:{a-z}={A-Z}' 'm:{a-z}={A-Z}
> } r:|[._-]=* r:|=*' 'm:{a-z}={A-Z} r:|[.-]=** r:|=**'
>   ^^^^^^^^^^
> I *think* the behavior you're seeing is correct, but Sven will have to
> confirm.  The match spec I marked means that file names are to split into
> segments at dot, underscore, and hyphen, for purposes of matching.  The
> doc says that "... the anchor can occur anywhere, but must match in both
> the command line and trial completion strings."  Since there's only one
> match for the anchor on the command line, only files having a single
> such segment are eligible for completion.

That's right. And it's the reason why I added -- on Andrej's request -- 
the `**'-thing. So, if you (Andrej) remove your third (including the '')
matcher so that the 'm:{a-z}={A-Z} r:|[._-]=** r:|=**' is the third
one, it'll work.

What's irritating you is probably that you seem to get different
behaviours depending on the directory contents. That's of course
because you used `**' in the last matcher. If there is at least one
file with only one of the anchor characters, the third one matches and 
you don't see any of the other matches. If all files have at least two 
anchor characters, you see all of them because the third matcher
doesn't help but the last matcher makes them be matched.


Bye
 Sven


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


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

* RE: Some problem with completion matching
  2000-12-14  7:18 Some problem with completion matching Sven Wischnowsky
@ 2000-12-14  8:29 ` Andrej Borsenkow
  0 siblings, 0 replies; 4+ messages in thread
From: Andrej Borsenkow @ 2000-12-14  8:29 UTC (permalink / raw)
  To: zsh-workers


Sorry, I went blind for some reason.

>
> What's irritating you is probably that you seem to get different
> behaviours depending on the directory contents.

Yes. I am not sure, if there is sensible way to avoid it, but may be I get
some idea.

-andrej


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

* Re: Some problem with completion matching
  2000-12-13 15:52 Andrej Borsenkow
@ 2000-12-13 16:42 ` Bart Schaefer
  0 siblings, 0 replies; 4+ messages in thread
From: Bart Schaefer @ 2000-12-13 16:42 UTC (permalink / raw)
  To: ZSH workers mailing list

On Dec 13,  6:52pm, Andrej Borsenkow wrote:
} 
} bor@itsrm2% l ntpd/*.c
} ntpd/check_y2k.c            ntpd/map_vme.c
} ntpd/ntp_config.c           ntpd/ntp_control.c
} ntpd/ntp_crypto.c           ntpd/ntp_filegen.c
} ..... etc
} bor@itsrm2% l ntpd/.cTAB
} bor@itsrm2% l ntpd/ntpd.c
} Completing file
} ntpd.c      version.c
} 
} ???
} 
} bor@itsrm2% zstyle -L
} zstyle ':completion:*' matcher-list '' 'm:{a-z}={A-Z}' 'm:{a-z}={A-Z}
} r:|[._-]=* r:|=*' 'm:{a-z}={A-Z} r:|[.-]=** r:|=**'
  ^^^^^^^^^^
I *think* the behavior you're seeing is correct, but Sven will have to
confirm.  The match spec I marked means that file names are to split into
segments at dot, underscore, and hyphen, for purposes of matching.  The
doc says that "... the anchor can occur anywhere, but must match in both
the command line and trial completion strings."  Since there's only one
match for the anchor on the command line, only files having a single
such segment are eligible for completion.

I have a similar problem with my own matcher-list which I've been sort of
halfheartedly trying to work out for a while now.  This example has made
me understand it better, but I still don't see a solution.

-- 
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] 4+ messages in thread

* Some problem with completion matching
@ 2000-12-13 15:52 Andrej Borsenkow
  2000-12-13 16:42 ` Bart Schaefer
  0 siblings, 1 reply; 4+ messages in thread
From: Andrej Borsenkow @ 2000-12-13 15:52 UTC (permalink / raw)
  To: ZSH workers mailing list


It is not the very latest CVS, but last patches should not affect this AFAIK.

bor@itsrm2% l ntpd/*.c
ntpd/check_y2k.c            ntpd/map_vme.c
ntpd/ntp_config.c           ntpd/ntp_control.c
ntpd/ntp_crypto.c           ntpd/ntp_filegen.c
..... etc
bor@itsrm2% l ntpd/.cTAB
bor@itsrm2% l ntpd/ntpd.c
Completing file
ntpd.c      version.c

???

bor@itsrm2% zstyle -L
zstyle ':completion:*' completer _oldlist _complete _match
zstyle ':completion:*:warnings' format 'No matches for: %d'
zstyle ':completion:*' format '%BCompleting %d%b'
zstyle ':completion:*' group-name ''
zstyle ':completion:*' insert-unambiguous true
zstyle ':completion:*' list-colors ''
zstyle ':completion:*' list-prompt '%SAt %p: Hit TAB for more, or the
character to insert%s'
zstyle ':completion:*' match-original both
zstyle ':completion:*' matcher-list '' 'm:{a-z}={A-Z}' 'm:{a-z}={A-Z}
r:|[._-]=* r:|=*' 'm:{a-z}={A-Z} r:|[.-]=** r:|=**'
zstyle ':completion:*' menu 'select=long-list' 'select=0'
zstyle ':completion:*' verbose true
zstyle :compinstall filename /home/bor/.zcompletion
zstyle ':completion:*:*:configure:*' tag-order 'options:-with:with\ options
options:-other:other\ options' 'options:-without:without\ options'
zstyle ':completion:*:options-with' ignored-patterns '^--with-*'
zstyle ':completion:*:options-without' ignored-patterns '^--without-*'
zstyle ':completion:*:options-other' ignored-patterns '--with(|out)-*'
zstyle ':completion:*' ambiguous true
zstyle ':completion:*' list-rows-first true
zstyle ':completion:*:processes' command '
        if (($EUID && !${+NUMERIC})); then
            ps -fu $EUID
        else
            ps -fe
        fi
'

-andrej

Have a nice DOS!
B >>


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

end of thread, other threads:[~2000-12-14  8:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-12-14  7:18 Some problem with completion matching Sven Wischnowsky
2000-12-14  8:29 ` Andrej Borsenkow
  -- strict thread matches above, loose matches on Subject: below --
2000-12-13 15:52 Andrej Borsenkow
2000-12-13 16:42 ` Bart Schaefer

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