From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6185 invoked from network); 12 May 2008 14:32:44 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.4 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 12 May 2008 14:32:44 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 94791 invoked from network); 12 May 2008 14:32:38 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 12 May 2008 14:32:38 -0000 Received: (qmail 9768 invoked by alias); 12 May 2008 14:32:36 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 25004 Received: (qmail 9755 invoked from network); 12 May 2008 14:32:35 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 12 May 2008 14:32:35 -0000 Received: from cluster-d.mailcontrol.com (cluster-d.mailcontrol.com [217.69.20.190]) by bifrost.dotsrc.org (Postfix) with ESMTP id 09A6A80ED172 for ; Mon, 12 May 2008 16:32:30 +0200 (CEST) Received: from rly41d.srv.mailcontrol.com (localhost.localdomain [127.0.0.1]) by rly41d.srv.mailcontrol.com (MailControl) with ESMTP id m4CEWU3T004091 for ; Mon, 12 May 2008 15:32:30 +0100 Received: from submission.mailcontrol.com (submission.mailcontrol.com [86.111.216.190]) by rly41d.srv.mailcontrol.com (MailControl) id m4CEVlqS031401 for zsh-workers@sunsite.dk; Mon, 12 May 2008 15:31:47 +0100 Received: from cameurexb01.EUROPE.ROOT.PRI ([62.189.241.200]) by rly41d-eth0.srv.mailcontrol.com (envelope-sender Peter.Stephenson@csr.com) (MIMEDefang) with ESMTP id m4CEVdf5030632; Mon, 12 May 2008 15:31:47 +0100 (BST) Received: from news01 ([10.103.143.38]) by cameurexb01.EUROPE.ROOT.PRI with Microsoft SMTPSVC(6.0.3790.3959); Mon, 12 May 2008 15:31:36 +0100 Date: Mon, 12 May 2008 15:31:36 +0100 From: Peter Stephenson To: "praful mathur" Cc: zsh-workers@sunsite.dk Subject: Re: Completion help Message-ID: <20080512153136.38d17b6b@news01> In-Reply-To: <563731560805120712r53a42ed0gda7b2260276faa0f@mail.gmail.com> References: <563731560805071045v2d4be6c6yc8c323db2d0b3a12@mail.gmail.com> <563731560805120709u10afbeefp2cf666b2d7304889@mail.gmail.com> <563731560805120712r53a42ed0gda7b2260276faa0f@mail.gmail.com> Organization: CSR X-Mailer: Claws Mail 3.3.1 (GTK+ 2.12.5; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable X-OriginalArrivalTime: 12 May 2008 14:31:36.0455 (UTC) FILETIME=[E21B8170:01C8B43C] X-Scanned-By: MailControl A-08-50-00 (www.mailcontrol.com) on 10.68.1.151 X-Virus-Scanned: ClamAV 0.91.2/7102/Mon May 12 15:06:15 2008 on bifrost X-Virus-Status: Clean On Mon, 12 May 2008 10:12:33 -0400 "praful mathur" wrote: > Can someone please direct me where this question has already been answere= d? > I've tried looking in zshall but I can't quite find an answer to my > question. I didn't really follow your original question since you're code doesn't seem to correspond to how the completion system actually works. If you want to know how to use _arguments, start by looking at the many existing completion functions that call _arguments and compare with what's in the description for _arguments in the zshcompsys manual page. For example, _hash (in Completion/Zsh/Command in the source) has the same problem of dealing with an option -d that gets followed by a directory and isn't as hairy of some of the files. You will have to look around and if you get stuck ask *specific* questions with which people will have more time to help. If you want a step-by-step guide, try the online guide at http://zsh.sunsite.dk/Guide/zshguide06.html#l177 (that's the tutorial section for completion: you might want to start earlier). For more detailed guidance, our book =46rom Bash to Z Shell: Conquering the Command Line (Paperback)=20 by Oliver Kiddle (Author), Jerry Peek (Author), Peter Stephenson (Author)= =20 Paperback: 472 pages Publisher: APRESS (1 Dec 2004) Language English ISBN-10: 1590593766 ISBN-13: 978-1590593769 has a lot on completion. --=20 Peter Stephenson Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070