From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8097 invoked from network); 13 May 2003 13:27:45 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 13 May 2003 13:27:45 -0000 Received: (qmail 14694 invoked by alias); 13 May 2003 13:27:39 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 18527 Received: (qmail 14687 invoked from network); 13 May 2003 13:27:39 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 13 May 2003 13:27:39 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [212.125.75.12] by sunsite.dk (MessageWall 1.0.8) with SMTP; 13 May 2003 13:27:38 -0000 Received: (qmail 27734 invoked from network); 13 May 2003 13:27:37 -0000 Received: from iris.logica.co.uk (158.234.9.163) by server-15.tower-4.messagelabs.com with SMTP; 13 May 2003 13:27:37 -0000 Received: from gmcs3.local ([158.234.142.61]) by iris.logica.co.uk (8.9.3/8.9.3/Debian 8.9.3-21) with ESMTP id OAA20622 for ; Tue, 13 May 2003 14:27:37 +0100 X-Authentication-Warning: iris.logica.co.uk: Host [158.234.142.61] claimed to be gmcs3.local Received: from gmcs3.local (localhost [127.0.0.1]) by gmcs3.local (8.11.6/8.11.6/SuSE Linux 0.5) with ESMTP id h4DDRud03903 for ; Tue, 13 May 2003 15:27:56 +0200 To: Zsh workers X-VirusChecked: Checked In-reply-to: <23075.1052819675@csr.com> From: Oliver Kiddle References: <23075.1052819675@csr.com> Subject: Re: current CVS test failure Date: Tue, 13 May 2003 15:27:56 +0200 Message-ID: <3901.1052832476@gmcs3.local> Peter wrote: > Oliver Kiddle wrote: > > So your -O is probably the best solution. Sorry to complicate this but I did another experiment and I think the compstate[nmatches] solution would work. I had thought that a tag-order of 'options arguments' (with quotes) would cause the completion of options to execute before arguments even though they display together but that is not the case: they execute in the same tag loop iteration so in the order they are defined. So, you would just have to make sure that anything calling _describe -o came last in the tag loop. It would actually work better though because it then does the job for you of seeing if options are completed alone or with other things. It would also mean that a tag-order specifying options before something else would complete the options first even if there was no `-' prefix. Which is I think better. So what do we prefer - an extra, obscure -O option to _describe or the peculiar must be last in the tag loop rule but with it working slightly better? Or does that explanation all make no sense? > With documentation added, it now looks like the following. > > I notice the option only affects prefix-needed, not prefix-hidden, which > was always handled by _describe. That's probably OK as this is a matter > for displaying. Yes, prefix-hidden is unrelated to this issue. > +descriptions are shown. If `tt(-O)' is used instead of `tt(-O)', command > +options are completed as above but tt(_describe) will not handle the > +tt(prefix-needed) style which is assumed to be handled by the calling > +function. -O is useful in contexts where only options are valid completions and so they should always be completed regardless of the prefix. So you might want to use -O and not handle prefix-needed in the calling function. Oliver