From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16375 invoked from network); 23 Mar 2007 12:30:22 -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=AWL,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 12:30:22 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 7770 invoked from network); 23 Mar 2007 12:30:17 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 23 Mar 2007 12:30:17 -0000 Received: (qmail 14924 invoked by alias); 23 Mar 2007 12:30:14 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 23231 Received: (qmail 14915 invoked from network); 23 Mar 2007 12:30:14 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 23 Mar 2007 12:30:14 -0000 Received: (qmail 7460 invoked from network); 23 Mar 2007 12:30:14 -0000 Received: from cluster-c.mailcontrol.com (168.143.177.190) by a.mx.sunsite.dk with SMTP; 23 Mar 2007 12:30:10 -0000 Received: from cameurexb01.EUROPE.ROOT.PRI ([62.189.241.200]) by rly11c.srv.mailcontrol.com (MailControl) with ESMTP id l2NCSOf2025797 for ; Fri, 23 Mar 2007 12:30:05 GMT Received: from news01.csr.com ([10.103.143.38]) by cameurexb01.EUROPE.ROOT.PRI with Microsoft SMTPSVC(6.0.3790.1830); Fri, 23 Mar 2007 12:30:00 +0000 Received: from news01.csr.com (localhost.localdomain [127.0.0.1]) by news01.csr.com (8.13.8/8.13.4) with ESMTP id l2NCU0RY030232 for ; Fri, 23 Mar 2007 12:30:00 GMT Received: from csr.com (pws@localhost) by news01.csr.com (8.13.8/8.13.8/Submit) with ESMTP id l2NCU0MS030229 for ; Fri, 23 Mar 2007 12:30:00 GMT Message-Id: <200703231230.l2NCU0MS030229@news01.csr.com> X-Authentication-Warning: news01.csr.com: pws owned process doing -bs To: zsh-workers@sunsite.dk Subject: Re: Completion alias In-reply-to: References: <200703230001.l2N013h0009082@pwslaptop.csr.com> Comments: In-reply-to =?UTF-8?Q?J=C3=B6rg?= Sommer message dated "Fri, 23 Mar 2007 10:44:07 +0000." Date: Fri, 23 Mar 2007 12:29:59 +0000 From: Peter Stephenson X-OriginalArrivalTime: 23 Mar 2007 12:30:00.0992 (UTC) FILETIME=[F9D43200:01C76D46] Content-Type: text/plain MIME-Version: 1.0 X-Scanned-By: MailControl A-07-06-90 (www.mailcontrol.com) on 10.67.0.121 =?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. It's easy to specify that a function should behave like apt-get: compdef agi=apt-get but without support in _apt there's no way of telling it to behave as if the "install" argument is present. I came up with a way of doing this for the Perforce completion: compdef _perforce p4cvsmap=p4-files says that "p4cvsmap ..." behaves like "p4 files ...". However, it's not trivial to bolt this method onto an existing completion unless it already has separate despatchers for subcommands. Furthermore, _apt uses the regex handling which makes it even more difficult. -- Peter Stephenson Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070 To access the latest news from CSR copy this link into a web browser: http://www.csr.com/email_sig.php To get further information regarding CSR, please visit our Investor Relations page at http://ir.csr.com/csr/about/overview