about summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-05-12 14:36:46 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-05-12 14:36:46 +0000
commita6ed22c58590da9faaaf9d9a46cf1050c2bb74d1 (patch)
tree9e50624eba9abe1074865dd5c990edcaa69153ee /Completion
parent56caa787a6660d5a5aa7531b1fe773332900d77d (diff)
downloadzsh-a6ed22c58590da9faaaf9d9a46cf1050c2bb74d1.tar.gz
zsh-a6ed22c58590da9faaaf9d9a46cf1050c2bb74d1.tar.xz
zsh-a6ed22c58590da9faaaf9d9a46cf1050c2bb74d1.zip
fix for completing options with `_arguments -s'; fix for _message to use `builtin compadd' (11349)
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Base/_arguments10
-rw-r--r--Completion/Core/_message2
2 files changed, 8 insertions, 4 deletions
diff --git a/Completion/Base/_arguments b/Completion/Base/_arguments
index e12dca47d..453e3d3e2 100644
--- a/Completion/Base/_arguments
+++ b/Completion/Base/_arguments
@@ -184,12 +184,16 @@ if (( $# )) && comparguments "$multi[@]" "$autod" "$@"; then
     else
       noargs='no arguments'
     fi
-    if ! comparguments -O next direct odirect equal; then
+    if comparguments -O next direct odirect equal; then
+      opts=yes
+      _tags options
+    elif [[ $? -eq 2 ]]; then
+        compadd -Q - "${PREFIX}${SUFFIX}"
+        return 0
+    else
       _message "$noargs"
       return 1
     fi
-    opts=yes
-    _tags options
   fi
 
   context=()
diff --git a/Completion/Core/_message b/Completion/Core/_message
index a7d765a6a..cd08d5fb0 100644
--- a/Completion/Core/_message
+++ b/Completion/Core/_message
@@ -15,6 +15,6 @@ fi
 
 if [[ -n "$format$raw" ]]; then
   [[ -z "$raw" ]] && zformat -f format "$format" "d:$1" "${(@)argv[2,-1]}"
-  compadd -x "$format"
+  builtin compadd -x "$format"
   _comp_mesg=yes
 fi