about summary refs log tree commit diff
path: root/Completion/Builtins/_zstyle
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Builtins/_zstyle')
-rw-r--r--Completion/Builtins/_zstyle26
1 files changed, 12 insertions, 14 deletions
diff --git a/Completion/Builtins/_zstyle b/Completion/Builtins/_zstyle
index b4e151d78..b19303300 100644
--- a/Completion/Builtins/_zstyle
+++ b/Completion/Builtins/_zstyle
@@ -96,20 +96,18 @@ while [[ -n $state ]]; do
 
   case "$ostate" in
     contexts)
-      if _wanted contexts; then
-        if [[ $PREFIX != :*: ]]; then
-	  _all_labels contexts expl context compadd -P : -S : completion zftp
-        elif [[ $PREFIX = :completion:* ]]; then
-          mesg=''
-          case "$PREFIX" in
-          :completion:[^:]#) mesg=function ;;
-          :completion:[^:]#:[^:]#) mesg=completer ;;
-          :completion:[^:]#:[^:]#:[^:]#) mesg='command or context' ;;
-          :completion:[^:]#:[^:]#:[^:]#:[^:]#) mesg=argument ;;
-          :completion:[^:]#:[^:]#:[^:]#:[^:]#:[^:]#) mesg=tag ;;
-	  esac
-	  [[ -n "$mesg" ]] && _message "$mesg"
-        fi
+      if [[ $PREFIX != :*: ]]; then
+	_wanted contexts expl context compadd -P : -S : completion zftp
+      elif [[ $PREFIX = :completion:* ]] && _tags contexts; then
+        mesg=''
+        case "$PREFIX" in
+        :completion:[^:]#) mesg=function ;;
+        :completion:[^:]#:[^:]#) mesg=completer ;;
+        :completion:[^:]#:[^:]#:[^:]#) mesg='command or context' ;;
+        :completion:[^:]#:[^:]#:[^:]#:[^:]#) mesg=argument ;;
+        :completion:[^:]#:[^:]#:[^:]#:[^:]#:[^:]#) mesg=tag ;;
+	esac
+	[[ -n "$mesg" ]] && _message "$mesg"
       fi
       ;;