Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: _mailboxes
- X-seq: zsh-workers 7968
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: PATCH: _mailboxes
- Date: Mon, 20 Sep 1999 23:58:00 +0000
- In-reply-to: <19990920124153.A21162@xxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <19990920124153.A21162@xxxxxxxx>
On Sep 20, 12:41pm, Clint Adams wrote:
> Subject: PATCH: _mailboxes
> Because [[ -f "${~muttrc}" ]] never returns true (the expansion does not
> occur when quoted), I changed it to test ${~muttrc} && [[ -f ${~muttrc} ]].
Oops. I still think the extra "test" is wasteful ...
> Also, since the special folders ! < > are also used in elm, I added a
> check for a ~/.elm directory. Perhaps it would be better to look for
> an .elmrc. I can't think of a good way to do this.
Running "strings =mutt" on a machine where it's installed indicates that it
has some (undocumented?) support for a ~/.mutt/ directory as well. So ...
Index: _mailboxes
===================================================================
@@ -12,7 +12,7 @@
if (( ! $+_mailbox_cache )) then
-test ${~muttrc} && [[ -f ${~muttrc} ]] && muttboxes=( ${$(grep mailboxes ${~muttrc})[2,-1]} )
+[[ -f ${~muttrc:-.} ]] && muttboxes=( ${$(grep mailboxes ${~muttrc})[2,-1]} )
mboxes=( ${~maildirectory}/*(^/) ${~pinedirectory}/**/*(.) )
dirboxes=( ${~maildirectory}/*(/) )
@@ -33,7 +33,7 @@
fi
done
-[[ -n "$muttboxes" ]] || [[ -d ~/.elm ]] &&
+[[ -n "$muttboxes" || -d ~/.elm || -d ~/.mutt ]] &&
_mailbox_cache=(\! \< \> $muttboxes)
[[ -n "$mailpath" ]] &&
_mailbox_cache=($_mailbox_cache ${mailpath//\?*/})
Messages sorted by:
Reverse Date,
Date,
Thread,
Author