From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11335 invoked by alias); 11 Dec 2014 17:22:12 -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: 19523 Received: (qmail 28695 invoked from network); 11 Dec 2014 17:22:11 -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=date:from:to:subject:message-id:mail-followup-to:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=RsPMxV+8s6jQHhn2cRV7PZ14QMlyuB5RVgshjgwbClQ=; b=cxc8Le65zJ5dI8LZi4DKDD6kWWdnewhodlPRCm3iL6/q36dNna2m1TXD2JXUzw77ce LGvElWP86gMogqY1JpMndcfpihDled+WDL+CGS8gOiC/fD4cQZLbsC7WRSKiN06hUD0w eyL7Z3vea4ZjfGlGXvlluZIwfvvcIhDkL431anUTpQr10lrbne+uKk6NSMNl0ritIHM/ 56d4gwVaHFprzwIR4K0QUiEpdTX1B6+VkjGKJn5rwmX3NvIIP0gCRzPy/IvilcZ4y4v0 xF4IdX8ugKUp82X9HSIZ8O3+K1llJyV5EMrO1QFfGxhl2AJHc8DuIMFvsfUXvv8Wqyua Je2w== X-Received: by 10.140.86.175 with SMTP id p44mr21324763qgd.54.1418318526346; Thu, 11 Dec 2014 09:22:06 -0800 (PST) Date: Thu, 11 Dec 2014 15:22:03 -0200 From: Silas Silva To: zsh-users@zsh.org Subject: Re: Alias and zstyle contexts Message-ID: <20141211172203.GA18049@rikku> Mail-Followup-To: zsh-users@zsh.org References: <20141208230255.GA6029@rikku> <20141209161119.GA2492@rikku> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) 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