From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21453 invoked by alias); 6 Dec 2010 14:41:33 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 15613 Received: (qmail 27052 invoked from network); 6 Dec 2010 14:41:31 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at theory.phy.tu-dresden.de does not designate permitted sender hosts) From: Martin Richter Reply-To: mrichter@theory.phy.tu-dresden.de Organization: TU Dresden To: zsh-users@zsh.org Subject: Using the same completion function for various commands Date: Mon, 6 Dec 2010 15:12:17 +0100 User-Agent: KMail/1.12.4 (Linux/2.6.31-22-generic; KDE/4.3.5; x86_64; ; ) MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <201012061512.21791.mrichter@theory.phy.tu-dresden.de> X-TUD-Virus-Scanned: mailout1.zih.tu-dresden.de 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 _ 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