Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: small fix for _tags



Oops. No good defining a parameter local and later try to set it
globally.


Bye
 Sven

diff -u -r oldcompletion/Core/_tags Completion/Core/_tags
--- oldcompletion/Core/_tags	Fri Nov  5 13:52:40 1999
+++ Completion/Core/_tags	Fri Nov  5 15:40:08 1999
@@ -1,7 +1,7 @@
 #autoload
 
 if (( $# )); then
-  local cmd="$words[1]" func="$funcstack[2]" defs i tags tag pat style prio
+  local cmd="$words[1]" func="$funcstack[2]" defs i ttags tag pat style prio
   local trynow
 
   while getopts 'c:f:i' i; do
@@ -38,7 +38,7 @@
     defs=( "$defs[@]" "$prio[@]" )
   done
 
-  tags=()
+  ttags=()
   for i in "$defs[@]"; do
     tag="${i%%:*}"
     for pat in "${(s.:.)i#*:}"; do
@@ -58,7 +58,7 @@
 
 	(( prio++ ))
 
-        tags[$prio]="${tags[$prio]}:${tag}${style}"
+        ttags[$prio]="${ttags[$prio]}:${tag}${style}"
         break
       fi
     done
@@ -66,7 +66,7 @@
 
   prio="_prio_arr$(( _prio_num++ ))"
   _prio_names[$funcstack]="$prio"
-  eval "${prio}=( \"\${(@)tags:#}\" )"
+  eval "${prio}=( \"\${(@)ttags:#}\" )"
 
   [[ -z "$trynow" ]] && return 0
 fi

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author