about summary refs log tree commit diff
path: root/Completion/User/_mutt
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/User/_mutt')
-rw-r--r--Completion/User/_mutt23
1 files changed, 12 insertions, 11 deletions
diff --git a/Completion/User/_mutt b/Completion/User/_mutt
index 1339c32b0..16b1b0c6d 100644
--- a/Completion/User/_mutt
+++ b/Completion/User/_mutt
@@ -1,6 +1,6 @@
 #compdef mutt
 
-local state line muttrc="~/.muttrc" ret=1
+local context state line muttrc="~/.muttrc" ret=1
 
  _arguments \
  '::recipient:->userhost' \
@@ -25,15 +25,16 @@ local state line muttrc="~/.muttrc" ret=1
  '-Z+:open first mailbox with new mail:' && ret=0
 
 if [[ "$state" = userhost ]]; then
-      if compset -P '*@'; then
-        _description expl 'remote host name'
-        _hosts "$expl[@]" -q -S,
-        return
-      else
-          _description expl 'login name'
-          _users "$expl[@]" -q -S@ && ret=0
-        fi
-      fi
+  _tags "$context" hosts || return 1
 
-return ret
+  if compset -P '*@'; then
+    _description expl 'remote host name'
+    _hosts "$expl[@]" -q -S, && return 0
+  else
+    _description expl 'login name'
+    _users "$expl[@]" -q -S@ && return 0
+   fi
+ fi
 fi
+
+return ret