about summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-09-21 01:46:31 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-09-21 01:46:31 +0000
commita939aea7a72526a18eb219ae29c994e764b4d0e3 (patch)
tree94d05319c35fb5675293b5decd7751ff1bb9ae5e /Completion
parentc38dac753bf352f756b89bf94cc8d968af2d102d (diff)
downloadzsh-a939aea7a72526a18eb219ae29c994e764b4d0e3.tar.gz
zsh-a939aea7a72526a18eb219ae29c994e764b4d0e3.tar.xz
zsh-a939aea7a72526a18eb219ae29c994e764b4d0e3.zip
zsh-workers/7961
Diffstat (limited to 'Completion')
-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