From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6173 invoked from network); 8 Aug 2004 14:43:26 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 8 Aug 2004 14:43:26 -0000 Received: (qmail 94455 invoked from network); 8 Aug 2004 14:43:19 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 8 Aug 2004 14:43:19 -0000 Received: (qmail 28276 invoked by alias); 8 Aug 2004 14:43:10 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 20240 Received: (qmail 28265 invoked from network); 8 Aug 2004 14:43:09 -0000 Received: from unknown (HELO a.mx.sunsite.dk) (130.225.247.88) by 130.225.247.90 with SMTP; 8 Aug 2004 14:43:09 -0000 Received: (qmail 93846 invoked from network); 8 Aug 2004 14:41:11 -0000 Received: from mail36.messagelabs.com (193.109.254.211) by a.mx.sunsite.dk with SMTP; 8 Aug 2004 14:41:09 -0000 X-VirusChecked: Checked X-Env-Sender: okiddle@yahoo.co.uk X-Msg-Ref: server-17.tower-36.messagelabs.com!1091976065!8344459 X-StarScan-Version: 5.2.10; banners=-,-,- X-Originating-IP: [158.234.9.163] Received: (qmail 1293 invoked from network); 8 Aug 2004 14:41:05 -0000 Received: from iris.logica.co.uk (158.234.9.163) by server-17.tower-36.messagelabs.com with SMTP; 8 Aug 2004 14:41:05 -0000 Received: from trentino.logica.co.uk ([158.234.142.61]) by iris.logica.co.uk (8.12.3/8.12.3/Debian -4) with ESMTP id i78Ef5f6017874; Sun, 8 Aug 2004 15:41:05 +0100 Received: from trentino.logica.co.uk (localhost [127.0.0.1]) by trentino.logica.co.uk (Postfix) with ESMTP id F1AA9791B004; Sun, 8 Aug 2004 16:40:20 +0200 (CEST) Cc: 258431@bugs.debian.org X-VirusChecked: Checked X-StarScan-Version: 5.0.7; banners=.,-,- In-reply-to: <20040808044557.GA8117@scowler.net> From: Oliver Kiddle References: <200408061350.i76DovBi028948@news01.csr.com> <20040806180339.GA31854@scowler.net> <10094.1091886003@trentino.logica.co.uk> <20040808044557.GA8117@scowler.net> To: Zsh Subject: default tag-order (was Re: zsh 4.2.1-test-A) Date: Sun, 08 Aug 2004 16:40:20 +0200 Message-ID: <16609.1091976020@trentino.logica.co.uk> 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 Clint Adams wrote: > I just double-checked to make sure I had really tested this with > 4.2.1-test-A, and I still can't complete any files at all; only options > are offered. > > This happens with zsh -f followed by compinit. One of my styles made a difference. I can reproduce it with zsh -f. The problem is with the default tag-order defined in _tags. The relevant bit of code is as follows: zstyle -a ":completion:${curcontext}:" tag-order order || order=('(|*-)argument-* (|*-)option[-+]* values' options) There are a few different things we could do here. I can't work out why "values" needs to be in there. Does _arguments ever add stuff with a values tag or does _values ever add stuff with an options tag? Can we remove the values tag from there without breaking anything? It has been there since the very first version of _tags. One safe option is to insert `(( ! ${@[(I)options]} )) ||'. That checks if there is an options tag before applying the tag-order. Any other thoughts? Default tag-orders really need thinking about in general. It'd be nice to be able to specify them from completion functions themself. This code above should really be in _arguments. That would need care, though. It is often the case that tag-orders are better not applied for _approximate or _correct for example. Oliver