zsh-users
 help / color / mirror / code / Atom feed
From: Silas Silva <silasdb@gmail.com>
To: zsh-users@zsh.org
Subject: Re: Alias and zstyle contexts
Date: Thu, 11 Dec 2014 15:22:03 -0200	[thread overview]
Message-ID: <20141211172203.GA18049@rikku> (raw)
In-Reply-To: <CAHYJk3ToNrKe59Z2-vKsfCvK0SavR8cnTAXbKdoFvhVnBY7azQ@mail.gmail.com>

On Wed, Dec 10, 2014 at 02:41:29AM +0100, Mikael Magnusson wrote:
> I don't have mutt so I can't try this, and if it doesn't work, maybe
> someone else has a suggestion.
> compdef -e 'curcontext=:complete:mutt:w:; _mutt' muttw
> and then set the mail-directory style for that tag instead. Maybe?
> There may be some much more elegant way to do this (if it at all
> works).

Hi Mikael and guys,

Thank for the tip.  It would work fine, if there wasn't a problem:
_mailboxes has a _mailbox_cache variable that would prevent the code to
evaluate again even in another context.  The workaround I came up with
is:

    compdef -e 'curcontext=:complete:mutt:w:; _mutt; unset _mailbox_cache' muttw

This is not beautiful but it works.

Is a patch to make _mailboxes work with different contexts and yet be
efficient (working with different cache for different context)
desirable?

Thank you very much!

-- 
Silas Silva


  reply	other threads:[~2014-12-11 17:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-08 23:02 Silas Silva
2014-12-08 23:24 ` Mikael Magnusson
2014-12-09 16:11   ` Silas Silva
2014-12-10  1:41     ` Mikael Magnusson
2014-12-11 17:22       ` Silas Silva [this message]
2014-12-08 23:25 ` Frank Terbeck

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=20141211172203.GA18049@rikku \
    --to=silasdb@gmail.com \
    --cc=zsh-users@zsh.org \
    /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).