zsh-workers
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: zsh-workers@sunsite.dk
Subject: Re: curtag (Re: can't run _email-mutt)
Date: Mon, 20 Jun 2005 14:17:21 +0200	[thread overview]
Message-ID: <10934.1119269841@trentino.groupinfra.com> (raw)
In-Reply-To: <1050619170913.ZM20484@candle.brasslantern.com>

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.


      reply	other threads:[~2005-06-20 12:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20050527141638.GA9644@xpeerience.u-strasbg.fr>
     [not found] ` <7779.1117444705@trentino.groupinfra.com>
     [not found]   ` <20050530135757.GA12204@xpeerience.u-strasbg.fr>
     [not found]     ` <13199.1117464233@trentino.groupinfra.com>
     [not found]       ` <20050602123718.GA21218@xpeerience.u-strasbg.fr>
2005-06-06 16:42         ` can't run _email-mutt Oliver Kiddle
2005-06-19 17:09           ` curtag (Re: can't run _email-mutt) Bart Schaefer
2005-06-20 12:17             ` Oliver Kiddle [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=10934.1119269841@trentino.groupinfra.com \
    --to=okiddle@yahoo.co.uk \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).