Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Skipping certain completers -- how?
- X-seq: zsh-workers 14918
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Skipping certain completers -- how?
- Date: Thu, 14 Jun 2001 17:23:55 +0000
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
I have:
zstyle ':completion:*' completer \
_oldlist _expand _complete _match _ignored _approximate _prefix
I'd like to use only a subset of that list in certain instances, but the
completer style is looked up with context ':completion:::::' so it's not
possible to use the context to restrict the list.
A specific example: When completing the cvs subcommand name (the first
word after `cvs' itself) I'd rather that _expand, _ignored, and _prefix
were NOT called.
My guess is that this can only be accomplished with a "control function"
similar to _prefix except operating sort of in reverse -- that is, you
make that function your only completer, then give the "real" completers
in a nother style that's looked up by the control function, which then
calls them.
We also have the avoid-completer style that could be used to give a list
of completers to skip in such a control function.
Can anyone think of anything else that would be involved, or of a better
way to accomplish this?
--
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author