Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Alias and zstyle contexts



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



Messages sorted by: Reverse Date, Date, Thread, Author