Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: matcher-list question

Andy Spiegl wrote:
> > How can I avoid this behaviour?
> > lama:~>zsh -f
> > lama% autoload -U compinit; compinit -C
> > lama% zstyle ":completion:*" matcher-list 'r:|[-./_]=* r:|=*' '+l:|=*'
> > lama% ls         
> > foo-bar-abc  foo-bar-def  foo-bar-geh
> > lama% ls bar<TAB>
> > lama% ls -foobar-
> > 
> > I'd really prefer:
> > lama% ls bar<TAB>
> > lama% ls foo-bar-
> Hm, nobody seems to know an answer...
> Does that mean, it is not avoidable at all?

There's a bug somewhere in the code that assembles partial lines using
matching in this fashion (the code that generates the lists seems to be
OK, or at least the list of matches is correct).  Unfortunately, I've
been watching the entrance to that piece of code carefully and nobody
has emerged alive from it in several years.

On the bright side, this is about the purest form of it I've yet seen,
so it might help in tracking it down if anybody has a spare week or two.

You can help matters by typing the initial "f-" yourself, which seems
to deconfuse it (and is probably another clue to what's going on).
Also, turning on menu completion seems to help.

Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070

Messages sorted by: Reverse Date, Date, Thread, Author