From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20170 invoked from network); 23 Mar 2007 15:57:51 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,FORGED_RCVD_HELO autolearn=ham version=3.1.8 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 23 Mar 2007 15:57:51 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 31863 invoked from network); 23 Mar 2007 15:57:44 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 23 Mar 2007 15:57:44 -0000 Received: (qmail 20815 invoked by alias); 23 Mar 2007 15:57:42 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 23235 Received: (qmail 20806 invoked from network); 23 Mar 2007 15:57:41 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 23 Mar 2007 15:57:41 -0000 Received: (qmail 31566 invoked from network); 23 Mar 2007 15:57:41 -0000 Received: from vms044pub.verizon.net (206.46.252.44) by a.mx.sunsite.dk with SMTP; 23 Mar 2007 15:57:33 -0000 Received: from torch.brasslantern.com ([71.116.70.212]) by vms044.mailsrvcs.net (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPA id <0JFD00EM85JNIDL0@vms044.mailsrvcs.net> for zsh-workers@sunsite.dk; Fri, 23 Mar 2007 10:55:01 -0500 (CDT) Received: from torch.brasslantern.com (localhost.localdomain [127.0.0.1]) by torch.brasslantern.com (8.13.1/8.13.1) with ESMTP id l2NFsxGC013980 for ; Fri, 23 Mar 2007 08:54:59 -0700 Received: (from schaefer@localhost) by torch.brasslantern.com (8.13.1/8.13.1/Submit) id l2NFswoF013979 for zsh-workers@sunsite.dk; Fri, 23 Mar 2007 08:54:58 -0700 Date: Fri, 23 Mar 2007 08:54:58 -0700 From: Bart Schaefer Subject: Re: Completion alias In-reply-to: <200703231230.l2NCU0MS030229@news01.csr.com> To: zsh-workers@sunsite.dk Message-id: <070323085458.ZM13978@torch.brasslantern.com> MIME-version: 1.0 X-Mailer: OpenZMail Classic (0.9.2 24April2005) Content-type: text/plain; charset=us-ascii References: <200703230001.l2N013h0009082@pwslaptop.csr.com> <200703231230.l2NCU0MS030229@news01.csr.com> Comments: In reply to Peter Stephenson "Re: Completion alias" (Mar 23, 12:29pm) On Mar 23, 12:29pm, Peter Stephenson wrote: } Subject: Re: Completion alias } } =?UTF-8?Q?J=C3=B6rg?= Sommer wrote: } > But how can I use this for a completion of a command with an argument, } > i.e. agi should have the same completion as 'agt-get install' } } That would require some rewriting of _apt. In this specific instance, if "agi" really is just shorthand for the entirely equivalent "apt-get install", then: alias agi='apt-get install' unsetopt complete_aliases I think it should also work to do _agi () { shift words service=apt-get words=(apt-get install $words) ((CURRENT++)) _apt } compdef _agi agi However, there may be something else that needs to be twaddled as well as service= and words= to guarantee that this works properly.