mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-10 12:40:58 +02:00
manual/9815
This commit is contained in:
parent
986bdad22e
commit
3b517729ca
1 changed files with 8 additions and 13 deletions
|
@ -48,46 +48,41 @@ if _wanted files expl 'mailbox specification'; then
|
||||||
local -U mbox_names
|
local -U mbox_names
|
||||||
case "${curcontext}" in
|
case "${curcontext}" in
|
||||||
(*:elm:*) # I've probably got this wrong, or at least incomplete
|
(*:elm:*) # I've probably got this wrong, or at least incomplete
|
||||||
compadd "${expl[@]}" - \! \< \>
|
|
||||||
mbox_names=( "${_mbox_cache[@]}" "${_mailbox_cache[@]}" )
|
mbox_names=( "${_mbox_cache[@]}" "${_mailbox_cache[@]}" )
|
||||||
_multi_parts "${expl[@]}" / mbox_names;;
|
compadd "${expl[@]}" - \! \< \>;;
|
||||||
(*:mail:*)
|
(*:mail:*)
|
||||||
if compset -P '+|-f+'; then
|
if compset -P '+|-f+'; then
|
||||||
mbox_names=( "${(@)_mbox_cache#$~maildirectory/}" )
|
mbox_names=( "${(@)_mbox_cache#$~maildirectory/}" )
|
||||||
_multi_parts "${expl[@]}" / mbox_names
|
|
||||||
else
|
else
|
||||||
mbox_names=( +"${(@)^_mbox_cache#$~maildirectory/}" "${_mailbox_cache[@]}" )
|
mbox_names=( +"${(@)^_mbox_cache#$~maildirectory/}" "${_mailbox_cache[@]}" )
|
||||||
_multi_parts "${expl[@]}" / mbox_names
|
|
||||||
_path_files -J all-files
|
_path_files -J all-files
|
||||||
fi;;
|
fi;;
|
||||||
(*:mh:*) # I've probably got this wrong, or at least incomplete
|
(*: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:*)
|
(*:mutt:*)
|
||||||
mbox_names=( "${_mutt_cache[@]}" "${_mailbox_cache[@]}" "${_maildir_cache[@]}" )
|
mbox_names=( "${_mutt_cache[@]}" "${_mailbox_cache[@]}" "${_maildir_cache[@]}" )
|
||||||
compadd "${expl[@]}" - \! \< \>
|
compadd "${expl[@]}" - \! \< \>;;
|
||||||
_multi_parts "${expl[@]}" / mbox_names;;
|
|
||||||
(*:pine:*)
|
(*:pine:*)
|
||||||
# Pine is like mail but with no leading `+' to disambiguate;
|
# Pine is like mail but with no leading `+' to disambiguate;
|
||||||
# any files not in $pinedirectory must be absolute paths.
|
# any files not in $pinedirectory must be absolute paths.
|
||||||
mbox_names=( "${(@)_pine_cache#$~pinedirectory/}" "${_mbox_cache[@]}" )
|
mbox_names=( "${(@)_pine_cache#$~pinedirectory/}" "${_mbox_cache[@]}" )
|
||||||
_multi_parts "${expl[@]}" / mbox_names
|
|
||||||
# _path_files -J all-files -g '/*'
|
# _path_files -J all-files -g '/*'
|
||||||
;;
|
;;
|
||||||
(*:(zmail|zmlite):*)
|
(*:(zmail|zmlite):*)
|
||||||
if compset -P '+|-f+'; then
|
if compset -P '+|-f+'; then
|
||||||
mbox_names=( "${(@)_mbox_cache#$~maildirectory/}" )
|
mbox_names=( "${(@)_mbox_cache#$~maildirectory/}" )
|
||||||
_multi_parts "${expl[@]}" / mbox_names
|
|
||||||
else
|
else
|
||||||
compadd "${expl[@]}" - % \&
|
|
||||||
mbox_names=( +"${(@)^_mbox_cache#$~maildirectory/}"
|
mbox_names=( +"${(@)^_mbox_cache#$~maildirectory/}"
|
||||||
"${_mailbox_cache[@]}" "${_mh_cache[@]}" )
|
"${_mailbox_cache[@]}" "${_mh_cache[@]}" )
|
||||||
_multi_parts "${expl[@]}" / mbox_names
|
compadd "${expl[@]}" - % \&
|
||||||
_path_files -J all-files
|
_path_files -J all-files
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
(*) # Some other program wants mailbox names? Use them all?
|
(*) # Some other program wants mailbox names? Use them all?
|
||||||
mbox_names=( "${_mailbox_cache[@]}" "${_mbox_cache[@]}"
|
mbox_names=( "${_mailbox_cache[@]}" "${_mbox_cache[@]}"
|
||||||
"${_mh_cache[@]}" "${_mutt_cache[@]}" "${_pine_cache[@]}" )
|
"${_mh_cache[@]}" "${_mutt_cache[@]}" "${_pine_cache[@]}" );;
|
||||||
_multi_parts "${expl[@]}" / mbox_names;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
(( $#mbox_names )) && _multi_parts "${expl[@]}" / mbox_names
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue