diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 2000-03-23 04:19:26 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 2000-03-23 04:19:26 +0000 |
commit | 626e2aeb1657f112feb6d03c34bb9e9f44764c75 (patch) | |
tree | 9e4a306df7b5826a796b99f0b6ffa3423ee9f5f9 /Completion/User/_mailboxes | |
parent | 766fcd5ee2ef632cd982a1ec118dbdfde17c03a8 (diff) | |
download | zsh-626e2aeb1657f112feb6d03c34bb9e9f44764c75.tar.gz zsh-626e2aeb1657f112feb6d03c34bb9e9f44764c75.tar.xz zsh-626e2aeb1657f112feb6d03c34bb9e9f44764c75.zip |
zsh-workers/10195
Diffstat (limited to 'Completion/User/_mailboxes')
-rw-r--r-- | Completion/User/_mailboxes | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/Completion/User/_mailboxes b/Completion/User/_mailboxes index 3f798c2d7..784bc4e6e 100644 --- a/Completion/User/_mailboxes +++ b/Completion/User/_mailboxes @@ -2,7 +2,7 @@ _mailboxes() { #emulate -L zsh - local expl nm="$compstate[nmatches]" + local expl ret=1 local pinedirectory="${pinedirectory:-~/mail}" local maildirectory="${maildirectory:-~/Mail}" @@ -40,15 +40,14 @@ _mailboxes() { esac while _tags; do - if _requested mailboxes expl 'mailbox specification'; then - _mua_mailboxes "$expl[@]" - fi + _requested mailboxes expl 'mailbox specification' _mua_mailboxes && ret=0 + if _requested files expl 'mailbox file'; then [[ "${curcontext}" != *:(mail|mush|zmail|zmlite):* ]] && compset -P -f - _path_files "$expl[@]" + _files "$expl[@]" && ret=0 fi - [[ nm -ne $compstate[nmatches] ]] && return 0 + (( ret )) || return 0 done return 1 @@ -96,6 +95,7 @@ _mua_mailboxes() { local -a mbox_short local -aU mbox_names + local ret=1 case "${curcontext}" in (*:elm:*) # I've probably got this wrong, or at least incomplete @@ -111,7 +111,7 @@ _mua_mailboxes() { 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 && ret=0 ;; (*:mush:*) if compset -P %; then @@ -155,7 +155,6 @@ _mua_mailboxes() { ;; esac - local ret=1 (( $#mbox_names )) && _multi_parts "$@" / mbox_names && ret=0 (( $#mbox_short )) && compadd "$@" - "$mbox_short[@]" && ret=0 return ret |