about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--Completion/Linux/Command/_modutils1
-rw-r--r--Completion/Unix/Command/_make11
-rw-r--r--Completion/Zsh/Command/_zmodload1
4 files changed, 11 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index edf8b0721..7eb2a8786 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2017-11-02  Oliver Kiddle  <opk@zsh.org>
+
+	* 41971: Completion/Linux/Command/_modutils,
+	Completion/Unix/Command/_make, Completion/Zsh/Command/_zmodload:
+	correctly break out of certain tag loops when there are matches
+
 2017-11-02  Peter Stephenson  <p.w.stephenson@ntlworld.com>
 
 	* Martijn: 41866: Src/builtin.c, Src/hashtable.c: no error for
diff --git a/Completion/Linux/Command/_modutils b/Completion/Linux/Command/_modutils
index 5aa4c9cc7..9a37fcae1 100644
--- a/Completion/Linux/Command/_modutils
+++ b/Completion/Linux/Command/_modutils
@@ -119,6 +119,7 @@ _modutils() {
 	    while _tags; do
 		_requested files expl "module file"  _files -g '*.ko(-.)' && ret=0
 		_requested modules expl module compadd -a modules && ret=0
+		(( ret )) || break
 	    done
 	    ;;
 
diff --git a/Completion/Unix/Command/_make b/Completion/Unix/Command/_make
index a2ee9ecac..890ad1c83 100644
--- a/Completion/Unix/Command/_make
+++ b/Completion/Unix/Command/_make
@@ -287,14 +287,9 @@ _make() {
       compset -P 1 '*='
       _value "$@" && ret=0
     else
-      _tags targets variables
-      while _tags
-      do
-        _requested targets expl 'make targets' \
-          compadd -Q -- $TARGETS && ret=0
-        _requested variables expl 'make variables' \
-          compadd -S '=' -F keys -- ${(k)VARIABLES} && ret=0
-      done
+      _alternative \
+        'targets:make target:compadd -Q -a TARGETS' \
+        'variables:make variable:compadd -S = -F keys -k VARIABLES' && ret=0
     fi
   esac
 
diff --git a/Completion/Zsh/Command/_zmodload b/Completion/Zsh/Command/_zmodload
index 31163eb72..3416d50c6 100644
--- a/Completion/Zsh/Command/_zmodload
+++ b/Completion/Zsh/Command/_zmodload
@@ -72,6 +72,7 @@ else
       _files -W module_path -g '*.(dll|s[ol]|bundle)(:r)' && ret=0
     _requested aliases expl 'module alias' \
       compadd "$suf[@]" -k 'modules[(R)alias*]' && ret=0
+    (( ret )) || return 0
   done
   return ret
 fi