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

RE: completion widgets in menu selection



> >
> >   Yes, all prerequisites are  implemented in current CVS. What is
> missing, is
> >   the widget/key binding itself, but if you use example from docs
> verbatim, it
> >   works. I've tried it and I confirm it.
>
> I just grabbed the latest CVS sources.  Care to give me a hint about
> where in the documentation I should look or what I should search for?

I'm using info; it is in "Completion system" - "Control Functions",
_all_matches completer or somewhere in 'man zshcompsys'. Small explanation:

example at the end of _all_matches description will simply include all items
completion system has generated at this point. But it won't do any completion
itself. What exactly completion system generates, depends on your completer
style for regular completion. My standard setting is

zstyle ':completion:*' completer _oldlist _complete _match

here first normal completion (where word on the line is taken verbatim) is
tried. If it fails (generates no matches), zsh tries to treat word on the line
as pattern and match possible completions against it. _oldlist just ensures
that zsh will reuse old list if it exists - it is not striclty neccessary and
is my personal preference.

I do not use _expand as part of normal completion (I prefer explict expansion
if needed) and I had problems with _correct/_approximate and path completion
(it was way too slow) - but, I have to try again.

Note, that _match is not related to file name globbing. It will equally well
work e.g. for any cvs completions (even those, that complete remote objects,
like modules). So, you can do something like 'cvs co *foo' to checkout
everything that ends with foo, even with remote repository

> :-) I'm not having any luck finding anything about that.
>

We desperately need somebody with fresh look to proofread zsh docs.

-andrej



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