From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3255 invoked by alias); 7 Dec 2010 15:09:16 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 28501 Received: (qmail 17038 invoked from network); 7 Dec 2010 15:09:04 -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: Tue, 7 Dec 2010 15:08:21 +0000 From: Peter Stephenson To: Zsh workers Subject: Re: Using the same completion function for various commands Message-ID: <20101207150821.771b5008@pwslap01u.europe.root.pri> In-Reply-To: <19832.1291733514@thecus> References: <201012061512.21791.mrichter@theory.phy.tu-dresden.de> <20101206151124.389fd287@pwslap01u.europe.root.pri> <15197.1291664361@thecus> <20101207115222.34859d66@pwslap01u.europe.root.pri> <19832.1291733514@thecus> 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=US-ASCII Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 07 Dec 2010 15:08:21.0907 (UTC) FILETIME=[968C0630:01CB9620] X-Scanned-By: MailControl A_10_80_00 (www.mailcontrol.com) on 10.71.0.126 On Tue, 07 Dec 2010 15:51:54 +0100 Oliver Kiddle wrote: > Peter Stephenson wrote: > > It looks like you can't in general distinguish between two ways of > > using the service: > > I don't think $service was ever intended to be usable as a command > name. The change also now assumes that the command is in your path > which often it isn't. It's also common to use /usr/gnu/bin/du and > expect it to use the GNU completions. Someone writing obscure > wrappers can sooner be expected to know what they're doing that > someone specifying commands with a full path. > > > In the first case you have the simple alternative of defining > > > > #compdef gdu > > _du "$@" > > > > which fixes the service for you. > > And in the second case you have the simple alternative of using > zstyle. I've got tens of these and am not too keen on creating > functions. And why break backward compatibility? OK, if you've got stuff that actually breaks that's a good reason for leaving it & I'll put it back the other way. -- 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, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom