about summary refs log tree commit diff
path: root/Completion/User
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>2000-02-21 17:35:29 +0000
committerTanaka Akira <akr@users.sourceforge.net>2000-02-21 17:35:29 +0000
commit7122ebd5abbfd625fbd0943fa5b05d0231bc474c (patch)
treeabfba8c626463b8195078dca057af25ec35fb856 /Completion/User
parent09ef7f9740e72fd2b62459d88aad8960fe6e296f (diff)
downloadzsh-7122ebd5abbfd625fbd0943fa5b05d0231bc474c.tar.gz
zsh-7122ebd5abbfd625fbd0943fa5b05d0231bc474c.tar.xz
zsh-7122ebd5abbfd625fbd0943fa5b05d0231bc474c.zip
zsh-workers/9822
Diffstat (limited to 'Completion/User')
-rw-r--r--Completion/User/_mailboxes24
1 files changed, 20 insertions, 4 deletions
diff --git a/Completion/User/_mailboxes b/Completion/User/_mailboxes
index f95bc0907..ee24e0442 100644
--- a/Completion/User/_mailboxes
+++ b/Completion/User/_mailboxes
@@ -54,7 +54,7 @@ fi
 # Files for pine must be absolute paths.
 
 if [[ "$PREFIX" != (|-f)+* &&
-      ( "${curcontext}" = *:(mail|zmail|zmlite):* ||
+      ( "${curcontext}" = *:(mail|mush|zmail|zmlite):* ||
         ( "${curcontext}" = *:pine:* && "$PREFIX" = (|-f)[/\~]* ) ) ]]; then
   _tags mailboxes files
 else
@@ -78,19 +78,35 @@ while _tags; do
       if compset -P '+|-f+'; then
         mbox_names=( "${(@)_mbox_cache#$~maildirectory/}" )
       else
-        mbox_names=( +"${(@)^_mbox_cache#$~maildirectory/}" "${_mailbox_cache[@]}" )
+        mbox_names=( +"${(@)^_mbox_cache#$~maildirectory/}"
+		    "${_mailbox_cache[@]}" )
       fi
       ;;
     (*:mh:*) # I've probably got this wrong, or at least incomplete
       (( $#_mh_cache )) && _multi_parts "${expl[@]}" / _mh_cache
       ;;
+    (*:mush:*)
+      if compset -P '+|-f+'; then
+        mbox_names=( "${(@)_mbox_cache#$~maildirectory/}" )
+      else
+        mbox_names=( +"${(@)^_mbox_cache#$~maildirectory/}"
+		     "${_mailbox_cache[@]}" )
+        mbox_short=( % \& )
+      fi
+      ;;
     (*:mutt:*)
-      mbox_names=( "${_mutt_cache[@]}" "${_mailbox_cache[@]}" "${_maildir_cache[@]}" )
+      mbox_names=( "${_mutt_cache[@]}" "${_mailbox_cache[@]}"
+		   "${_maildir_cache[@]}" )
       mbox_short=( \! \< \> );;
     (*:pine:*)
       # Pine is like mail but with no leading `+' to disambiguate;
       # any files not in $pinedirectory must be absolute paths.
-      mbox_names=( "${(@)_pine_cache#$~pinedirectory/}" "${_mbox_cache[@]}" )
+      mbox_names=( "${(@)_pine_cache#$~pinedirectory/}" "${_mbox_cache[@]}"
+		   "${_mailbox_cache[@]}" "${_mh_cache[@]}" )
+      ;;
+    (*:tkrat:*) # Has a couple of custom formats I haven't programmed for.
+      mbox_names=( "${_mbox_cache[@]}"
+		   "${_mailbox_cache[@]}" "${_mh_cache[@]}" )
       ;;
     (*:(zmail|zmlite):*)
       if compset -P '+|-f+'; then