From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29011 invoked by alias); 10 Dec 2014 01:41:36 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 19516 Received: (qmail 15371 invoked from network); 10 Dec 2014 01:41:35 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=RS/w1Cco1DcqsEXz+fD/5gPuAo/ha3mAHYBlnQWkujs=; b=c8hBWgdIeGm6keqMxOXDg8tKEGui9mZFQTaqimwTcQGLMiVKFKu8WrW7i4EAPIQCcU IcvFgaaZFOVuox8HoQDsiRlu2O9GWxa+QTvjLlX8gUsecVo82FKyNRlgBpjOWUarZtoC a+yUbtKK3ymkm8cr8k/twGOT2jijoqCUhPnDpnD7vtQREo5sZGVjvbDcnwkHd55SsGvT SCPcfKN8+XwOyhlre/jcmmVwiMAgYPri9ywfb5V6Lj4TxOdWVw5nCkhv0zsf8ogMAhvw NnS7s6jxM9kdhqHkidn18k6wKigzxib+EH2dj28aEIa6LlieOkwYFRvHHKoBKuaCVPXn SwlQ== MIME-Version: 1.0 X-Received: by 10.50.67.113 with SMTP id m17mr5686117igt.4.1418175689835; Tue, 09 Dec 2014 17:41:29 -0800 (PST) In-Reply-To: <20141209161119.GA2492@rikku> References: <20141208230255.GA6029@rikku> <20141209161119.GA2492@rikku> Date: Wed, 10 Dec 2014 02:41:29 +0100 Message-ID: Subject: Re: Alias and zstyle contexts From: Mikael Magnusson To: Mikael Magnusson , Zsh Users Content-Type: text/plain; charset=UTF-8 On Tue, Dec 9, 2014 at 5:11 PM, Silas Silva 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