diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 2000-02-21 12:10:14 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 2000-02-21 12:10:14 +0000 |
commit | 3b517729cafde567f12b51dadaf5cb58910bc0de (patch) | |
tree | 21159a713af10d95cd7f99b8b92cb969d8d19eda | |
parent | 986bdad22ea16c23e03b2bf27e6cee7fc7a37ad4 (diff) | |
download | zsh-3b517729cafde567f12b51dadaf5cb58910bc0de.tar.gz zsh-3b517729cafde567f12b51dadaf5cb58910bc0de.tar.xz zsh-3b517729cafde567f12b51dadaf5cb58910bc0de.zip |
manual/9815
-rw-r--r-- | Completion/User/_mailboxes | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/Completion/User/_mailboxes b/Completion/User/_mailboxes index c88b201d5..2cf5361ba 100644 --- a/Completion/User/_mailboxes +++ b/Completion/User/_mailboxes @@ -48,46 +48,41 @@ if _wanted files expl 'mailbox specification'; then local -U mbox_names case "${curcontext}" in (*:elm:*) # I've probably got this wrong, or at least incomplete - compadd "${expl[@]}" - \! \< \> mbox_names=( "${_mbox_cache[@]}" "${_mailbox_cache[@]}" ) - _multi_parts "${expl[@]}" / mbox_names;; + compadd "${expl[@]}" - \! \< \>;; (*:mail:*) if compset -P '+|-f+'; then mbox_names=( "${(@)_mbox_cache#$~maildirectory/}" ) - _multi_parts "${expl[@]}" / mbox_names else mbox_names=( +"${(@)^_mbox_cache#$~maildirectory/}" "${_mailbox_cache[@]}" ) - _multi_parts "${expl[@]}" / mbox_names _path_files -J all-files fi;; (*:mh:*) # I've probably got this wrong, or at least incomplete - (( $#_mh_cache )) && _multi_parts "${expl[@]}" / _mh_cache;; + (( $#_mh_cache )) && _multi_parts "${expl[@]}" / _mh_cache + return;; (*:mutt:*) mbox_names=( "${_mutt_cache[@]}" "${_mailbox_cache[@]}" "${_maildir_cache[@]}" ) - compadd "${expl[@]}" - \! \< \> - _multi_parts "${expl[@]}" / mbox_names;; + compadd "${expl[@]}" - \! \< \>;; (*: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[@]}" ) - _multi_parts "${expl[@]}" / mbox_names # _path_files -J all-files -g '/*' ;; (*:(zmail|zmlite):*) if compset -P '+|-f+'; then mbox_names=( "${(@)_mbox_cache#$~maildirectory/}" ) - _multi_parts "${expl[@]}" / mbox_names else - compadd "${expl[@]}" - % \& mbox_names=( +"${(@)^_mbox_cache#$~maildirectory/}" "${_mailbox_cache[@]}" "${_mh_cache[@]}" ) - _multi_parts "${expl[@]}" / mbox_names + compadd "${expl[@]}" - % \& _path_files -J all-files fi ;; (*) # Some other program wants mailbox names? Use them all? mbox_names=( "${_mailbox_cache[@]}" "${_mbox_cache[@]}" - "${_mh_cache[@]}" "${_mutt_cache[@]}" "${_pine_cache[@]}" ) - _multi_parts "${expl[@]}" / mbox_names;; + "${_mh_cache[@]}" "${_mutt_cache[@]}" "${_pine_cache[@]}" );; esac + + (( $#mbox_names )) && _multi_parts "${expl[@]}" / mbox_names fi |