From 3b517729cafde567f12b51dadaf5cb58910bc0de Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Mon, 21 Feb 2000 12:10:14 +0000 Subject: manual/9815 --- Completion/User/_mailboxes | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'Completion/User/_mailboxes') 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 -- cgit 1.4.1