From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2391 invoked from network); 6 Sep 1999 18:18:20 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 6 Sep 1999 18:18:20 -0000 Received: (qmail 6945 invoked by alias); 6 Sep 1999 18:18:12 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7672 Received: (qmail 6938 invoked from network); 6 Sep 1999 18:18:11 -0000 Date: Mon, 6 Sep 1999 19:18:10 +0100 From: Adam Spiers To: zsh-workers@sunsite.auc.dk Subject: Re: PATCH: completion for perldoc Message-ID: <19990906191810.B1322@thelonious.new.ox.ac.uk> Reply-To: Adam Spiers Mail-Followup-To: zsh-workers@sunsite.auc.dk References: <199909061137.NAA01937@beta.informatik.hu-berlin.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.4i In-Reply-To: <199909061137.NAA01937@beta.informatik.hu-berlin.de>; from Sven Wischnowsky on Mon, Sep 06, 1999 at 01:37:14PM +0200 Sven Wischnowsky (wischnow@informatik.hu-berlin.de) wrote: > Adam Spiers wrote: > > I noticed Etc/Completion-style-guide soon after posting and realised > > the many problems with that _perl* :-( > > Never mind. All this isn't fixed in stone yet and the `style-guide' is > quite new. I've been uploading the style-guide and the _arguments documentation to my brain, and improved versions are on the way. _arguments is great! However a few things perplex me: - Why can't you have multiple MESSAGE:ACTION pairs with the *:MESSAGE:ACTION form? I'm having to resort to using an auxiliary function, e.g.: _perldoc { _arguments -s \ '-h:help:' \ '(-q)-f:Perl built-in function:_perl_builtin_funcs' \ '(-f)-q:Perl FAQ keyword:' \ '*:Perl pod pages:_perl_pods' } _perl_pods { local nm="$compstate[nmatches]" _perl_modules _perl_basepods _path_files -J "Perl modules and .pods" -/ -g '*.(pod|pm)' [[ nm -ne compstate[nmatches] ]] } - Is it possible to do something like (-foo)*:MESSAGE:ACTION, i.e. specifying completion for normal args only if -foo hasn't been specified? > P.P.S.: The function system started as an attempt to make the syntax > easier to understand. And now we have a completion function > that explains what it does by giving an equivalent `compctl' ;-) I hadn't thought of that :-D