summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBart Schaefer <barts@users.sourceforge.net>2001-03-24 18:22:54 +0000
committerBart Schaefer <barts@users.sourceforge.net>2001-03-24 18:22:54 +0000
commite50ffb3f593e65969651d26660a2bd49c128e128 (patch)
treee2c4219089aede5617a5a750db92caf198f5b550
parentfd305eb30a08a9ec6d130a4adf9a2a4582c77c73 (diff)
downloadzsh-e50ffb3f593e65969651d26660a2bd49c128e128.tar.gz
zsh-e50ffb3f593e65969651d26660a2bd49c128e128.zip
Fixes for mh completions.
-rw-r--r--ChangeLog6
-rw-r--r--Completion/User/_mailboxes14
2 files changed, 18 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 73e9bf411..1206c4d46 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2001-03-24 Bart Schaefer <schaefer@zsh.org>
+
+ * 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 <schaefer@zsh.org>
* 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