From: Martin Richter <mrichter@theory.phy.tu-dresden.de>
To: zsh-users@zsh.org
Subject: Using the same completion function for various commands
Date: Mon, 6 Dec 2010 15:12:17 +0100 [thread overview]
Message-ID: <201012061512.21791.mrichter@theory.phy.tu-dresden.de> (raw)
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
next reply other threads:[~2010-12-06 14:41 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-06 14:12 Martin Richter [this message]
2010-12-06 14:54 ` Mikael Magnusson
2010-12-06 15:01 ` Jérémie Roquet
2010-12-06 15:03 ` Mikael Magnusson
2010-12-06 15:11 ` Peter Stephenson
2010-12-06 15:18 ` Mikael Magnusson
2010-12-06 16:10 ` Peter Stephenson
2010-12-06 16:21 ` Peter Stephenson
2010-12-06 16:44 ` Bart Schaefer
2010-12-06 17:08 ` Peter Stephenson
2010-12-06 19:39 ` Oliver Kiddle
2010-12-07 11:52 ` Peter Stephenson
2010-12-06 15:23 ` Martin Richter
2010-12-06 15:31 ` Jérémie Roquet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201012061512.21791.mrichter@theory.phy.tu-dresden.de \
--to=mrichter@theory.phy.tu-dresden.de \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).