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

Re: Alias and zstyle contexts



On Tue, Dec 9, 2014 at 5:11 PM, Silas Silva <silasdb@xxxxxxxxx> wrote:
> On Tue, Dec 09, 2014 at 12:24:34AM +0100, Mikael Magnusson wrote:
> (...)
>> > mutt's -f option looks for mailboxes using the mail-directory style.  I
>> > have a "muttw" alias that I'd like to load mailboxes from another
>> > directory, but the context is the same.
> (...)
>>
>> Just making a function and saying compdef muttw=mutt should be enough.
>
> Hi!
>
> It works fine, thank you!  But, unfortunately zsh's _mutt file checks
> if $curcontext is mutt or some other alternatives.  Since I now have
> muttw context, it doesn't work well.  Is it possible to trick _mutt
> without having to change its code?
>
> Thank you very much.

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).

-- 
Mikael Magnusson



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