From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17383 invoked by alias); 6 Dec 2010 15:12:29 -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: 15617 Received: (qmail 28129 invoked from network); 6 Dec 2010 15:12:18 -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, SPF_HELO_PASS autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at csr.com does not designate permitted sender hosts) Date: Mon, 6 Dec 2010 15:11:24 +0000 From: Peter Stephenson To: Zsh Users Subject: Re: Using the same completion function for various commands Message-ID: <20101206151124.389fd287@pwslap01u.europe.root.pri> In-Reply-To: References: <201012061512.21791.mrichter@theory.phy.tu-dresden.de> Organization: Cambridge Silicon Radio X-Mailer: Claws Mail 3.7.6 (GTK+ 2.20.1; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-OriginalArrivalTime: 06 Dec 2010 15:11:25.0132 (UTC) FILETIME=[D95830C0:01CB9557] X-Scanned-By: MailControl A_10_80_00 (www.mailcontrol.com) on 10.71.0.138 On Mon, 6 Dec 2010 16:03:51 +0100 Mikael Magnusson wrote: > 2010/12/6 J=C3=A9r=C3=A9mie Roquet : > > Hi, > > > > 2010/12/6 Mikael Magnusson : > >> You can also do this in your .zshrc instead of in the completer if > >> you wish, just write > >> compdef _foo -p 'foo_*' > >> > >> At least that's what the documentation says, it doesn't seem to > >> work that well. > > > > It works fine for me with 4.3.10, did I miss something? >=20 > When i tried compdef _du -p foo_\*, i only got single-letter options > completed. >=20 That means it's working perfectly. It's hitting this line at the top of _du _pick_variant gnu=3DFree\ Soft unix --version /dummy/no-such-file and deciding, quite reasonably in my opinion, that foo_\* is not a GNU variant of du. So it's going to the other branch, where the options are simpler. --=20 Peter Stephenson Software Engineer Tel: +44 (0)1223 692070 Cambridge Silicon Radio Limited Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, = UK Member of the CSR plc group of companies. CSR plc registered in England and= Wales, registered number 4187346, registered office Churchill House, Cambr= idge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom