From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22899 invoked by alias); 7 Dec 2010 14:57:27 -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: 28500 Received: (qmail 3644 invoked from network); 7 Dec 2010 14:57:16 -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.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at yahoo.co.uk does not designate permitted sender hosts) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s1024; t=1291733515; bh=pXbLnUdVwI0Rctz/bojjmle8fmbJLugVC9Rio78bVB8=; h=X-Yahoo-Newman-Id:Received:X-Yahoo-SMTP:X-YMail-OSG:X-Yahoo-Newman-Property:Received:In-reply-to:From:References:To:Subject:MIME-Version:Content-Type:Content-ID:Date:Message-ID; b=Y08sM36nuRSQL9i6rZtJJ/z3l85r+d3vI9RG7oj+Nkl9DOI0lMEjm2aSmQBb89gOrcEbbrZf+GDHJtj4ioPF9VCLKTy3Xvp0TzT37I/Jp16Zph6u20eqAeQTJZaxeN6BZs7Ly2m/2QIi3ex/bRT+UgObI1U7eOstORfv49qQaFw= X-Yahoo-Newman-Id: 862775.57670.bm@smtp147.mail.ukl.yahoo.com X-Yahoo-SMTP: opAkk_CswBAce_kJ3nIPlH80cJI- X-YMail-OSG: sb5k_sMVM1koJK0o3bLZk8tteg4ICLEOeDrn6ONe984AJ3i VpcTvoIw2JC5oFJsF2HHBR8oZos9GdFh2af2esuqlBfWm9RTb8uUKRK8efaN YV4VClSUik0K2z3YgBCQxCuxAn1vIuEgGKg8G99hB3DTvAZqoRZyI3DZLHKI aShZGsq7kwQ4IpSePhf0EuqTsWCE8BVfpA1KTM_T7_e5N3unx8E0.yikRfYG rcpkRMmwG0OnnFaI4NBnCc1DCzt5fZMTci5zGbUIx2SBB_znxXprmTAliTJ2 H16Yy X-Yahoo-Newman-Property: ymail-3 In-reply-to: <20101207115222.34859d66@pwslap01u.europe.root.pri> From: Oliver Kiddle References: <201012061512.21791.mrichter@theory.phy.tu-dresden.de> <20101206151124.389fd287@pwslap01u.europe.root.pri> <15197.1291664361@thecus> <20101207115222.34859d66@pwslap01u.europe.root.pri> To: Zsh workers Subject: Re: Using the same completion function for various commands MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <19824.1291733507.1@thecus> Date: Tue, 07 Dec 2010 15:51:54 +0100 Message-ID: <19832.1291733514@thecus> 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? Oliver