Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: _mailboxes
- X-seq: zsh-workers 7961
- From: Clint Adams <schizo@xxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: PATCH: _mailboxes
- Date: Mon, 20 Sep 1999 12:41:53 -0400
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Because [[ -f "${~muttrc}" ]] never returns true (the expansion does not
occur when quoted), I changed it to test ${~muttrc} && [[ -f ${~muttrc} ]].
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. Also, the check
for muttboxes should probably be replaced by a check for a muttrc,
since it is possible that a user will have a muttrc without
specifying mailboxes but impossible to specify mailboxes without
a muttrc (I hope), though I would guess that a substantial chunk
of users have neither.
Finally, I included $mailpath, since it seems like a good place to
find mailboxes that a user cares about.
This reminds me that the mailcheck functionality is still not
comprehensive. I wonder if it would be beneficial for the mailbox
detection we're using in _mailboxes to be moved elsewhere and
used by both the completion system and checkmailpath.
*** Completion/User/_mailboxes.old Mon Sep 20 05:06:27 1999
--- Completion/User/_mailboxes Mon Sep 20 12:25:10 1999
***************
*** 12,18 ****
if (( ! $+_mailbox_cache )) then
! [[ -f "${~muttrc}" ]] && muttboxes=( ${$(grep mailboxes ${~muttrc})[2,-1]} )
mboxes=( ${~maildirectory}/*(^/) ${~pinedirectory}/**/*(.) )
dirboxes=( ${~maildirectory}/*(/) )
--- 12,18 ----
if (( ! $+_mailbox_cache )) then
! test ${~muttrc} && [[ -f ${~muttrc} ]] && muttboxes=( ${$(grep mailboxes ${~muttrc})[2,-1]} )
mboxes=( ${~maildirectory}/*(^/) ${~pinedirectory}/**/*(.) )
dirboxes=( ${~maildirectory}/*(/) )
***************
*** 33,40 ****
fi
done
! [[ -n "$muttboxes" ]] &&
_mailbox_cache=(\! \< \> $muttboxes)
_mailbox_cache=($_mailbox_cache $mboxes $maildirboxes $MHboxes)
fi
--- 33,43 ----
fi
done
! [[ -n "$muttboxes" ]] || [[ -d ~/.elm ]] &&
_mailbox_cache=(\! \< \> $muttboxes)
+ [[ -n "$mailpath" ]] &&
+ _mailbox_cache=($_mailbox_cache ${mailpath//\?*/})
+
_mailbox_cache=($_mailbox_cache $mboxes $maildirboxes $MHboxes)
fi
Messages sorted by:
Reverse Date,
Date,
Thread,
Author