From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20621 invoked from network); 8 Aug 2004 17:28:52 -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 17:28:52 -0000 Received: (qmail 73180 invoked from network); 8 Aug 2004 17:28:46 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 8 Aug 2004 17:28:46 -0000 Received: (qmail 24190 invoked by alias); 8 Aug 2004 17:28:27 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 20245 Received: (qmail 24172 invoked from network); 8 Aug 2004 17:28:27 -0000 Received: from unknown (HELO a.mx.sunsite.dk) (130.225.247.88) by 130.225.247.90 with SMTP; 8 Aug 2004 17:28:27 -0000 Received: (qmail 72066 invoked from network); 8 Aug 2004 17:26:29 -0000 Received: from mail36.messagelabs.com (193.109.254.211) by a.mx.sunsite.dk with SMTP; 8 Aug 2004 17:26:26 -0000 X-VirusChecked: Checked X-Env-Sender: okiddle@yahoo.co.uk X-Msg-Ref: server-14.tower-36.messagelabs.com!1091985983!8345571 X-StarScan-Version: 5.2.10; banners=-,-,- X-Originating-IP: [158.234.9.163] Received: (qmail 27837 invoked from network); 8 Aug 2004 17:26:23 -0000 Received: from iris.logica.co.uk (158.234.9.163) by server-14.tower-36.messagelabs.com with SMTP; 8 Aug 2004 17:26:23 -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 i78HQNf6029592; Sun, 8 Aug 2004 18:26:23 +0100 Received: from trentino.logica.co.uk (localhost [127.0.0.1]) by trentino.logica.co.uk (Postfix) with ESMTP id 17CD3791B004; Sun, 8 Aug 2004 19:25:39 +0200 (CEST) X-VirusChecked: Checked X-StarScan-Version: 5.0.7; banners=.,-,- In-reply-to: From: Oliver Kiddle References: <200408061350.i76DovBi028948@news01.csr.com> <20040806180339.GA31854@scowler.net> <10094.1091886003@trentino.logica.co.uk> <20040808044557.GA8117@scowler.net> <16609.1091976020@trentino.logica.co.uk> To: zsh-workers@sunsite.dk, 258431@bugs.debian.org Subject: Re: default tag-order (was Re: zsh 4.2.1-test-A) Date: Sun, 08 Aug 2004 19:25:39 +0200 Message-ID: <17811.1091985939@trentino.logica.co.uk> X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=-4.9 required=6.0 tests=BAYES_00 autolearn=no version=2.63 X-Spam-Hits: -4.9 You wrote: > I'm confused by this suggestion. If there's no options tag, the tag-order > doesn't make any difference, because it's in the second group of tags. > And in the case of cdrecord, there _is_ an options tag. How would that > proposed change help? Well the options aren't completed in the same tag loop so it doesn't affect _cdrecord. _arguments just doesn't get used that way. Checking for the other tags ((|*-)argument-* (|*-)option[-+]* or values) doesn't particularly help given that there is only a problem when they (or values to be precise) are there. > > Default tag-orders really need thinking about in general. It'd be nice > > to be able to specify them from completion functions themself. > > Why is that not possible? For example, several completion functions set > the cache-policy style if it's not already set. Doing it that way is ugly. And not just because the function has to lookup the style before setting it. It just seems wrong to me for completion functions to set styles. There's quite a lot of places where default tag orders would be useful so it would potentially clutter the style list. For all other styles, we don't set the style to achieve a default so why should we make an exception for tag-order. It is also the case that a certain zstyle context will apply to more than one tag loop so you can't always give them different defaults. I think the cache-policy stuff would be far better handled by guarding the policy functions with (( $+functions[_foo_caching_policy] )) || I don't see why they should have a style when anything else you want to override is just done by having a replacement function. Judging by 20211, the cache stuff isn't used much anyway. Oliver