zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: zsh-workers@sunsite.auc.dk
Subject: Re: PATCH: _mailboxes
Date: Mon, 20 Sep 1999 23:58:00 +0000	[thread overview]
Message-ID: <990920235800.ZM13135@candle.brasslantern.com> (raw)
In-Reply-To: <19990920124153.A21162@dman.com>

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//\?*/})
  


      reply	other threads:[~1999-09-20 23:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-09-20 16:41 Clint Adams
1999-09-20 23:58 ` Bart Schaefer [this message]

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=990920235800.ZM13135@candle.brasslantern.com \
    --to=schaefer@candle.brasslantern.com \
    --cc=zsh-workers@sunsite.auc.dk \
    /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).