From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9446 invoked from network); 28 Sep 2004 00:03:16 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 28 Sep 2004 00:03:16 -0000 Received: (qmail 50151 invoked from network); 28 Sep 2004 00:03:10 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 28 Sep 2004 00:03:10 -0000 Received: (qmail 15121 invoked by alias); 28 Sep 2004 00:03:07 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 20413 Received: (qmail 15111 invoked from network); 28 Sep 2004 00:03:07 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 28 Sep 2004 00:03:07 -0000 Received: (qmail 49916 invoked from network); 28 Sep 2004 00:03:07 -0000 Received: from dsl3-63-249-88-2.cruzio.com (HELO binome.blorf.net) (63.249.88.2) by a.mx.sunsite.dk with SMTP; 28 Sep 2004 00:03:05 -0000 Received: by binome.blorf.net (Postfix, from userid 1000) id E78D52BB8; Mon, 27 Sep 2004 17:03:03 -0700 (PDT) Date: Mon, 27 Sep 2004 17:03:03 -0700 From: Wayne Davison To: Oliver Kiddle Cc: zsh-workers@sunsite.dk Subject: Re: Completion for darcs Message-ID: <20040928000303.GB12616@blorf.net> References: <20040925003815.GD26071@blorf.net> <17141.1096275731@trentino.logica.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <17141.1096275731@trentino.logica.co.uk> User-Agent: Mutt/1.5.6+20040722i X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=-0.0 required=6.0 tests=BAYES_44 autolearn=no version=2.63 X-Spam-Hits: -0.0 On Mon, Sep 27, 2004 at 11:02:11AM +0200, Oliver Kiddle wrote: > This doesn't complete filenames at all. It includes files because the output of the darcs command lists what it considers to be appropriate files for the command being completed. (It also lists other args, such as repository URLs and such.) > We also don't need to grep for $PREFIX: matching is done far better > internally. [...] We also don't need the _darcs() { ... } stuff and > the compadds should go through _wanted (the second perhaps through > _arguments). Return statements are also wrong. Thanks for the notes. Since I haven't created any completion functions before, I had used what the darcs folks suggested with minimal changes. I've just checked in an improved version based on your critique. I hope that it is somewhat better. ..wayne..