about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-08-01 07:18:43 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-08-01 07:18:43 +0000
commit3896f72f4d4364af53a2ec3be727cf288e917949 (patch)
tree23501f775f35a51888bba8beee2c09a4f6c4b3f6
parent4f9ff8206ba046343c77bb7698c2e66cc5b4edf2 (diff)
downloadzsh-3896f72f4d4364af53a2ec3be727cf288e917949.tar.gz
zsh-3896f72f4d4364af53a2ec3be727cf288e917949.tar.xz
zsh-3896f72f4d4364af53a2ec3be727cf288e917949.zip
make $compcontext more powerful and easier to use for simple cases (12449)
-rw-r--r--ChangeLog6
-rw-r--r--Completion/Base/_arguments7
-rw-r--r--Completion/Base/_values5
3 files changed, 13 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index a9a53289b..f32ad904e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2000-08-01  Sven Wischnowsky  <wischnow@zsh.org>
+
+	* 12449: Completion/Base/_arguments, Completion/Base/_values,
+ 	Completion/Core/_complete, Doc/Zsh/compsys.yo: make $compcontext
+ 	more powerful and easier to use for simple cases
+	
 2000-07-31  Peter Stephenson  <pws@csr.com>
 
 	* Config/version.mk: 3.1.9-dev-4.
diff --git a/Completion/Base/_arguments b/Completion/Base/_arguments
index 4f33048e0..6d09871df 100644
--- a/Completion/Base/_arguments
+++ b/Completion/Base/_arguments
@@ -270,8 +270,9 @@ if (( $# )) && comparguments -i "$autod" "$@"; then
 
               # Anything inside `(...)' is added directly.
 
-              _all_labels "$subc" expl "$descr" \
-                  compadd "$subopts[@]" - ${=action[2,-2]}
+              eval ws\=\( "${action[2,-2]}" \)
+
+              _all_labels "$subc" expl "$descr" compadd "$subopts[@]" -a - ws
 	      tried=yes
             elif [[ "$action" = \{*\} ]]; then
 
@@ -294,7 +295,7 @@ if (( $# )) && comparguments -i "$autod" "$@"; then
 
               # Otherwise we call it with the description-arguments.
 
-              set -A action ${=~action}
+	      eval "action=( $action )"
               while _next_label "$subc" expl "$descr"; do
                 "$action[1]" "$subopts[@]" "$expl[@]" "${(@)action[2,-1]}"
 	      done
diff --git a/Completion/Base/_values b/Completion/Base/_values
index 39c8df201..cb90ed578 100644
--- a/Completion/Base/_values
+++ b/Completion/Base/_values
@@ -119,8 +119,9 @@ if compvalues -i "$@"; then
 
       # Anything inside `(...)' is added directly.
 
-      _all_labels arguments expl "$descr" \
-          compadd "$subopts[@]" - ${=action[2,-2]}
+      eval ws\=\( "${action[2,-2]}" \)
+
+      _all_labels arguments expl "$descr" compadd "$subopts[@]" -a - ws
     elif [[ "$action" = \{*\} ]]; then
 
       # A string in braces is evaluated.