From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26148 invoked from network); 20 Jun 2005 12:17:45 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 20 Jun 2005 12:17:45 -0000 Received: (qmail 94334 invoked from network); 20 Jun 2005 12:17:39 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 20 Jun 2005 12:17:39 -0000 Received: (qmail 15376 invoked by alias); 20 Jun 2005 12:17:36 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 21364 Received: (qmail 15367 invoked from network); 20 Jun 2005 12:17:36 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 20 Jun 2005 12:17:36 -0000 Received: (qmail 94005 invoked from network); 20 Jun 2005 12:17:35 -0000 Received: from cluster-e.mailcontrol.com (HELO rly12e.srv.mailcontrol.com) (217.79.216.190) by a.mx.sunsite.dk with SMTP; 20 Jun 2005 12:17:29 -0000 Received: from iris.logica.co.uk (iris.logica.co.uk [158.234.9.163]) by rly12e.srv.mailcontrol.com (MailControl) with ESMTP id j5KCHM7M032509 for ; Mon, 20 Jun 2005 13:17:25 +0100 Received: from trentino.logica.co.uk ([158.234.142.59]) by iris.logica.co.uk (8.12.3/8.12.3/Debian -4) with ESMTP id j5KCHMKM017389 for ; Mon, 20 Jun 2005 13:17:22 +0100 Received: from trentino.groupinfra.com (localhost [127.0.0.1]) by trentino.logica.co.uk (Postfix) with ESMTP id 0AB7E784A4 for ; Mon, 20 Jun 2005 14:17:21 +0200 (CEST) X-VirusChecked: Checked X-StarScan-Version: 5.0.7; banners=.,-,- In-reply-to: <1050619170913.ZM20484@candle.brasslantern.com> From: Oliver Kiddle References: <20050527141638.GA9644@xpeerience.u-strasbg.fr> <7779.1117444705@trentino.groupinfra.com> <20050530135757.GA12204@xpeerience.u-strasbg.fr> <13199.1117464233@trentino.groupinfra.com> <20050602123718.GA21218@xpeerience.u-strasbg.fr> <22509.1118076149@trentino.groupinfra.com> <1050619170913.ZM20484@candle.brasslantern.com> To: zsh-workers@sunsite.dk Subject: Re: curtag (Re: can't run _email-mutt) Date: Mon, 20 Jun 2005 14:17:21 +0200 Message-ID: <10934.1119269841@trentino.groupinfra.com> X-Scanned-By: MailControl A-05-01-01 (www.mailcontrol.com) X-Spam-Checker-Version: SpamAssassin 3.0.2 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, score=-2.5 required=6.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.2 X-Spam-Hits: -2.5 Bart wrote: > I'm not sure how $curtag would apply in this case, because it's not set > until _requested or _wanted calls _all_labels from inside the _tags loop? > Or are we talking about nested _tags loops here, which is already a bit > of a sticky wicket? It'd need to use ${curtag:-email-addresses} to cover cases where a tag isn't supplied by the calling function. I just think that the tag is the right place for it. We could use the argument field as you suggested. It's not really what that's meant for and we'd lose any existing value in the argument field. That means you can't, for example, spot when you have the -c flag to mutt. But the argument field is probably better than nothing. > It's entirely possible that there's some subtlety I'm missing. > > On a more general note, though, it would appear that $curtag is rather > under-utilized. By a quick grep I count about 15 functions that use both > _tags and zstyle without reference to $curtag. _email_addresses is the > only one that seems to use it as it was intended. It really depends whether it is potentially useful to have different settings for different tags or tag labels in each situation. It is under-utilized, however. Searching for uses of _tags and zstyle isn't necessarily helpful because different settings for tag labels could also be useful. For example in _pids, we could put _call_program within a tag loop. I've not tested this but it should then be possible to do the following: zstyle ':completion:*:processes' tag-order \ 'processes:-tty' 'processes:-mine' 'processes:-all' zstyle ':completion:*:processes-tty' command ps zstyle ':completion:*:processes-mine' command "ps -u $EUID" zstyle ':completion:*:processes-all' command 'ps -e' Then, when completing process IDs, _next_tags can be used to control which processes are listed. Oliver This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.