1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-08 12:01:21 +02:00

manual/9815

This commit is contained in:
Tanaka Akira 2000-02-21 12:10:14 +00:00
parent 986bdad22e
commit 3b517729ca

View file

@ -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