From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5312 invoked from network); 6 Nov 2000 14:37:01 -0000 Received: from sunsite.dk (HELO sunsite.auc.dk) (130.225.51.30) by ns1.primenet.com.au with SMTP; 6 Nov 2000 14:37:01 -0000 Received: (qmail 29502 invoked by alias); 6 Nov 2000 14:36:54 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13125 Received: (qmail 29493 invoked from network); 6 Nov 2000 14:36:54 -0000 Date: Mon, 6 Nov 2000 09:36:50 -0500 From: Clint Adams To: zsh-workers@sunsite.auc.dk Subject: _mailboxes and mutt backticks Message-ID: <20001106093650.B3716@dman.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii User-Agent: Mutt/1.1.2i In the muttrc, one may use backticks in the 'mailboxes' specification. On init, mutt passes each string enclosed in backticks to 'sh -c', and expands the result. Currently, zsh's _mailboxes does not cope with this. I applied the patch below, which does not seem to be an ideal solution. Also, with or without this patch, and with or without backticks in my muttrc, my first completion from mutt -f is /, which is not very useful at all. This does not happen under a vanilla compinit from zsh -f but I haven't tracked down which style or option is relevant. --- /usr/share/zsh/functions/_mailboxes Sun Oct 22 01:52:12 2000 +++ _mailboxes Sun Nov 5 09:10:06 2000 @@ -62,15 +62,15 @@ _mailbox_cache () { # Depends on $maildirectory and $pinedirectory from _mailboxes! - local i j muttrc="${muttrc:-~/.muttrc}" + local i j _mc_tmp muttrc="${muttrc:-~/.muttrc}" local -aU dirboxes typeset -aU -g _mailbox_cache typeset -aU -g _maildir_cache _mbox_cache _mh_cache _mutt_cache _pine_cache [[ -f ${~muttrc:-.} ]] && - _mutt_cache=( ${=${(M)${(f)"$(<${~muttrc})"}:#mailboxes *}#mailboxes *} ) - + _mc_tmp=${=${(M)${(f)"$(<${~muttrc})"}:#mailboxes *}#mailboxes *} && + _mutt_cache=( ${=${(Xe)_mc_tmp}} ) _mbox_cache=( ${~maildirectory}/*(^/) ) _pine_cache=( ${~pinedirectory}/**/*(.) )