zsh-users
 help / color / mirror / code / Atom feed
From: Mikael Magnusson <mikachu@gmail.com>
To: Mikael Magnusson <mikachu@gmail.com>, Zsh Users <zsh-users@zsh.org>
Subject: Re: Alias and zstyle contexts
Date: Wed, 10 Dec 2014 02:41:29 +0100	[thread overview]
Message-ID: <CAHYJk3ToNrKe59Z2-vKsfCvK0SavR8cnTAXbKdoFvhVnBY7azQ@mail.gmail.com> (raw)
In-Reply-To: <20141209161119.GA2492@rikku>

On Tue, Dec 9, 2014 at 5:11 PM, Silas Silva <silasdb@gmail.com> 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


  reply	other threads:[~2014-12-10  1:41 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 [this message]
2014-12-11 17:22       ` Silas Silva
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=CAHYJk3ToNrKe59Z2-vKsfCvK0SavR8cnTAXbKdoFvhVnBY7azQ@mail.gmail.com \
    --to=mikachu@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).