From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26814 invoked from network); 12 May 2003 10:08:55 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 12 May 2003 10:08:55 -0000 Received: (qmail 8790 invoked by alias); 12 May 2003 10:08:47 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 18521 Received: (qmail 8781 invoked from network); 12 May 2003 10:08:46 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 12 May 2003 10:08:46 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [212.125.75.12] by sunsite.dk (MessageWall 1.0.8) with SMTP; 12 May 2003 10:8:45 -0000 Received: (qmail 13628 invoked from network); 12 May 2003 10:08:36 -0000 Received: from iris.logica.co.uk (158.234.9.163) by server-11.tower-4.messagelabs.com with SMTP; 12 May 2003 10:08:36 -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 LAA28168 for ; Mon, 12 May 2003 11:08:36 +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 h4CA8sV02416 for ; Mon, 12 May 2003 12:08:54 +0200 X-VirusChecked: Checked In-reply-to: <23086.1051710727@csr.com> From: Oliver Kiddle References: <23086.1051710727@csr.com> To: Zsh workers Subject: Re: current CVS test failure Date: Mon, 12 May 2003 12:08:54 +0200 Message-ID: <2414.1052734134@gmcs3.local> On 30 Apr, Peter wrote: > Oliver Kiddle wrote: > > The test is doing _arguments '-+o'. Because there are no other > > (non-option) things being completed, it adds the -o and +o regardless > > of the prefix. In _describe, I can't know if _arguments is completing > > other things so I can't think of any easy solution other than checking > > prefix-needed manually in any other function using _describe -o. > > how about adding another option to _describe e.g. -O which works the > same but doesn't test prefix-needed and only gets called from > _arguments? I couldn't think of a particularly better solution. A nasty hack would involve looking at $compstate[nmatches] to see if anything else had been completed but you can't rely on the options be completed after whatever else. postfunctions aren't much use because they are run too late after all the completers. In some respects prefix-needed is actually redundant because the same can be achieved with the ignored-patterns style. So your -O is probably the best solution. Oliver