diff --git a/ChangeLog b/ChangeLog index 73e9bf411..1206c4d46 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2001-03-24 Bart Schaefer + + * 13740: Completion/User/_mailboxes: Fixes for mh (based on PWS's + patch in 13737): handle sub-folders; handle +folder abbreviations; + add commented-out lines that might eventually handle @folder, too. + 2001-03-23 Bart Schaefer * 13736: Test/01grammar.ztst: Enable more tests as they seem to 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