From e50ffb3f593e65969651d26660a2bd49c128e128 Mon Sep 17 00:00:00 2001 From: Bart Schaefer Date: Sat, 24 Mar 2001 18:22:54 +0000 Subject: Fixes for mh completions. --- Completion/User/_mailboxes | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'Completion') diff --git a/Completion/User/_mailboxes b/Completion/User/_mailboxes index b20abcf4e..6b3ece850 100644 --- a/Completion/User/_mailboxes +++ b/Completion/User/_mailboxes @@ -84,6 +84,7 @@ _mailbox_cache () { _maildir_cache=( "${_maildir_cache[@]}" "$i" ) elif j=( "$i"/<1-> ) && [[ -n "$j" ]]; then _mh_cache=( "${_mh_cache[@]}" "$i" ) + dirboxes=( $dirboxes "$i"/*(/) ) else _mbox_cache=( "${_mbox_cache[@]}" "$i"/*(.) ) dirboxes=( $dirboxes "$i"/*(/) ) @@ -116,8 +117,17 @@ _mua_mailboxes() { "${_mailbox_cache[@]}" ) fi ;; - (*:mh:*) # I've probably got this wrong, or at least incomplete - (( $#_mh_cache )) && _multi_parts "${expl[@]}" / _mh_cache && ret=0 + (*:mh:*) +# local lastmhbox=??? # Where does this come from? + if compset -P +; then + mbox_names=( "${(@)_mh_cache#$~maildirectory/}" ) +# elif compset -P @; then +# mbox_names=( "${(@)${(@M)_mh_cache:#$~lastmhbox/*}#$~lastmhbox/}" ) + else + mbox_names=( +"${(@)^_mh_cache#$~maildirectory/}" +# @"${(@)^${(@M)_mh_cache:#$~lastmhbox/*}#$~lastmhbox/}" + "${_mh_cache[@]}" ) + fi ;; (*:mush:*) if compset -P %; then -- cgit 1.4.1