summaryrefslogtreecommitdiffstats
path: root/Completion/User/_mailboxes
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-09-22 12:58:08 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-09-22 12:58:08 +0000
commitd6ed401f6061f9240ff6ece611b8ae8b6e9cceda (patch)
tree73a0b0f8c4cc345a35b3287a0f9ba1e72aeb32bf /Completion/User/_mailboxes
parentzsh-workers/7960 (diff)
downloadzsh-d6ed401f6061f9240ff6ece611b8ae8b6e9cceda.tar
zsh-d6ed401f6061f9240ff6ece611b8ae8b6e9cceda.tar.gz
zsh-d6ed401f6061f9240ff6ece611b8ae8b6e9cceda.tar.bz2
zsh-d6ed401f6061f9240ff6ece611b8ae8b6e9cceda.tar.lz
zsh-d6ed401f6061f9240ff6ece611b8ae8b6e9cceda.tar.xz
zsh-d6ed401f6061f9240ff6ece611b8ae8b6e9cceda.tar.zst
zsh-d6ed401f6061f9240ff6ece611b8ae8b6e9cceda.zip
zsh-workers/7961
Diffstat (limited to 'Completion/User/_mailboxes')
-rw-r--r--Completion/User/_mailboxes7
1 files changed, 5 insertions, 2 deletions
diff --git a/Completion/User/_mailboxes b/Completion/User/_mailboxes
index 08dbec816..eee6c6f35 100644
--- a/Completion/User/_mailboxes
+++ b/Completion/User/_mailboxes
@@ -12,7 +12,7 @@ local maildirectory="${maildirectory:-~/Mail}"
if (( ! $+_mailbox_cache )) then
-[[ -f "${~muttrc}" ]] && muttboxes=( ${$(grep mailboxes ${~muttrc})[2,-1]} )
+test ${~muttrc} && [[ -f ${~muttrc} ]] && muttboxes=( ${$(grep mailboxes ${~muttrc})[2,-1]} )
mboxes=( ${~maildirectory}/*(^/) ${~pinedirectory}/**/*(.) )
dirboxes=( ${~maildirectory}/*(/) )
@@ -33,8 +33,11 @@ do
fi
done
-[[ -n "$muttboxes" ]] &&
+[[ -n "$muttboxes" ]] || [[ -d ~/.elm ]] &&
_mailbox_cache=(\! \< \> $muttboxes)
+[[ -n "$mailpath" ]] &&
+ _mailbox_cache=($_mailbox_cache ${mailpath//\?*/})
+
_mailbox_cache=($_mailbox_cache $mboxes $maildirboxes $MHboxes)
fi