about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-05-23 08:54:30 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-05-23 08:54:30 +0000
commitee681a32ad5a2e69301494be45556a4020fe1384 (patch)
treefbb0c6fa5f02dd7a7525e2ab8a83c9c64b8c8b17
parentcb50583b184fd8aa456fcadd0c25e0c43f704a72 (diff)
downloadzsh-ee681a32ad5a2e69301494be45556a4020fe1384.tar.gz
zsh-ee681a32ad5a2e69301494be45556a4020fe1384.tar.xz
zsh-ee681a32ad5a2e69301494be45556a4020fe1384.zip
use `set -A' instead of `eval' in more places (11525)
-rw-r--r--ChangeLog5
-rw-r--r--Completion/Base/_arguments2
-rw-r--r--Completion/Commands/_complete_help2
-rw-r--r--Completion/Commands/_next_tags4
-rw-r--r--Completion/Core/_description12
-rw-r--r--Completion/Core/_next_label4
6 files changed, 17 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index 232fe924f..cc135fe81 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2000-05-23  Sven Wischnowsky  <wischnow@zsh.org>
 
+	* 11525: Completion/Base/_arguments, Completion/Commands/_complete_help,
+ 	Completion/Commands/_next_tags, Completion/Core/_description,
+ 	Completion/Core/_next_label: use `set -A' instead of `eval' in
+ 	more places
+	
 	* 11524: Src/builtin.c: fix for read -q without a shout
 	
 	* 11523: Src/hist.c, Src/init.c, Src/lex.c, Src/zsh.h, Src/Zle/zle.h,
diff --git a/Completion/Base/_arguments b/Completion/Base/_arguments
index 4b7aaa1a0..b605605da 100644
--- a/Completion/Base/_arguments
+++ b/Completion/Base/_arguments
@@ -149,7 +149,7 @@ if (( long )); then
 	cache=( "$cache[@]" "$tmp[@]" )
       fi
     done
-    eval "${name}=( \"\${(@)cache:# #}\" )"
+    set -A "$name" "${(@)cache:# #}"
   fi
   set -- "$tmpargv[@]" "${(@P)name}"
 fi
diff --git a/Completion/Commands/_complete_help b/Completion/Commands/_complete_help
index 94ca4abe0..36c41607b 100644
--- a/Completion/Commands/_complete_help
+++ b/Completion/Commands/_complete_help
@@ -32,7 +32,7 @@ _complete_help() {
     # No need to call the completers more than once with different match specs.
 
     if [[ "$3" = matcher-list ]]; then
-      eval "${4}=( '' )"
+      set -A "$4" ''
     else
       builtin zstyle "$@"
     fi
diff --git a/Completion/Commands/_next_tags b/Completion/Commands/_next_tags
index a308b307c..eb20494d7 100644
--- a/Completion/Commands/_next_tags
+++ b/Completion/Commands/_next_tags
@@ -62,10 +62,10 @@ _next_tags() {
         zformat -f descr "${curtag#*:}" "d:$3"
         _description "$gopt" "${curtag%:*}" "$2" "$descr"
         curtag="${curtag%:*}"
-        eval "${2}=( \${(P)2} \$argv[4,-1] )"
+	set -A "$2" "${(P@)2}" "${(@)argv[4,-1]}"
       else
         _description "$gopt" "$curtag" "$2" "$3"
-        eval "${2}=( \$argv[4,-1] \${(P)2} )"
+	set -A "$2" "${(@)argv[4,-1]}" "${(P@)2}"
       fi
 
       return 0
diff --git a/Completion/Core/_description b/Completion/Core/_description
index 4423f4a21..557dd6ca0 100644
--- a/Completion/Core/_description
+++ b/Completion/Core/_description
@@ -26,8 +26,8 @@ fi
 zstyle -s ":completion:${curcontext}:$1" group-name gname &&
     [[ -z "$gname" ]] && gname="$1"
 zstyle -s ":completion:${curcontext}:$1" matcher match &&
-    opts=($opts -M "${(q)match}")
-[[ -n "$_matcher" ]] && opts=($opts -M "${(q)_matcher}")
+    opts=($opts -M "$match")
+[[ -n "$_matcher" ]] && opts=($opts -M "$_matcher")
 
 if [[ -z "$_comp_no_ignore" ]]; then
   if zstyle -a ":completion:${curcontext}:$1" ignored-patterns _comp_ignore; then
@@ -48,15 +48,15 @@ shift 2
 
 if [[ -n "$gname" ]]; then
   if [[ -n "$format" ]]; then
-    eval "${name}=($opts $gropt ${(q)gname} -X \"${format}\")"
+    set -A "$name" "$opts[@]" "$gropt" "$gname" -X "$format"
   else
-    eval "${name}=($opts $gropt ${(q)gname})"
+    set -A "$name" "$opts[@]" "$gropt" "$gname"
   fi
 else
   if [[ -n "$format" ]]; then
-    eval "${name}=($opts $gropt -default- -X \"${format}\")"
+    set -A "$name" "$opts[@]" "$gropt" -default- -X "$format"
   else
-    eval "${name}=($opts $gropt -default-)"
+    set -A "$name" "$opts[@]" "$gropt" -default-
   fi
 fi
 
diff --git a/Completion/Core/_next_label b/Completion/Core/_next_label
index 620e67421..95569df3b 100644
--- a/Completion/Core/_next_label
+++ b/Completion/Core/_next_label
@@ -13,10 +13,10 @@ if comptags -A "$1" curtag spec; then
     zformat -f descr "${curtag#*:}" "d:$3"
     _description "$gopt" "${curtag%:*}" "$2" "$descr"
     curtag="${curtag%:*}"
-    set -A $2 "${(P@)2}" "${argv[4,-1][@]}"
+    set -A $2 "${(P@)2}" "${(@)argv[4,-1]}"
   else
     _description "$gopt" "$curtag" "$2" "$3"
-    set -A $2 "${argv[4,-1][@]}" "${(P@)2}"
+    set -A $2 "${(@)argv[4,-1]}" "${(P@)2}"
   fi
 
   return 0