Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Using the same completion function for various commands
- X-seq: zsh-users 15613
- From: Martin Richter <mrichter@xxxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Using the same completion function for various commands
- Date: Mon, 6 Dec 2010 15:12:17 +0100
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- Organization: TU Dresden
- Reply-to: mrichter@xxxxxxxxxxxxxxxxxxxxxxxx
Hello,
I'm searching the documentation for quite a while now but can't figure out how
to do the following:
I wrote a completion function which resides somewhere in $fpath, let's call it
_foo. But I don't want to have it applied on the command foo only. I want to use
it on all commands matching a certain pattern, e.g. foo_1, foo_2, ... (or foo_*
for short). Is it possible to define a context for this (like
:completion::complete:foo_*::) and use zstyle to bind this completer to it?
Unfortunately I couldn't figure out how.
zstyle "*" completer _<TAB>
only tells me about some built-ins.
Thank you very much and please forgive me in case I oversaw something obvious in
the documentation.
Martin
Messages sorted by:
Reverse Date,
Date,
Thread,
Author