about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--Completion/Core/_sort_tags2
-rw-r--r--Completion/Core/_tags6
-rw-r--r--Doc/Zsh/compsys.yo5
3 files changed, 11 insertions, 2 deletions
diff --git a/Completion/Core/_sort_tags b/Completion/Core/_sort_tags
index 778a6000b..bc12e5974 100644
--- a/Completion/Core/_sort_tags
+++ b/Completion/Core/_sort_tags
@@ -26,3 +26,5 @@ case "$curcontext" in
 esac
 
 comptry "$@"
+
+return 0
diff --git a/Completion/Core/_tags b/Completion/Core/_tags
index 1884717e2..6e3966074 100644
--- a/Completion/Core/_tags
+++ b/Completion/Core/_tags
@@ -44,7 +44,11 @@ if (( $# )); then
     for tag in $order; do
       case $tag in
       -)     nodef=yes;;
-      *\(\)) "${${tag%%[ 	]#\(\)}##[ 	]#}" "$@";;
+      *\(\)) if ! "${${tag%%[ 	]#\(\)}##[ 	]#}" "$@"; then
+               nodef=yes
+               break
+             fi
+             ;;
       \!*)   comptry "${(@)argv:#(${(j:|:)~${=tag[2,-1]}})}";;
       ?*)    comptry ${=tag};;
       esac
diff --git a/Doc/Zsh/compsys.yo b/Doc/Zsh/compsys.yo
index 9c38c3e27..48e1ffbf6 100644
--- a/Doc/Zsh/compsys.yo
+++ b/Doc/Zsh/compsys.yo
@@ -1435,7 +1435,10 @@ Strings in the value may also be of the form `var(func)tt(())'. In
 this case the function var(func) will be called which can then define
 in which order tags are to be used based on additional context
 information. See the tt(_sort_tags) function below for a description
-of how such functions can be implemented.
+of how such functions can be implemented. The return value of the
+function is used to decide if the following values for the style
+should be used. If it is zero, they are used and if it is non-zero,
+they are not used.
 
 If no style has been defined for a context, the strings tt(arguments
 values), tt(options), tt(globbed-files), tt(directories) and