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

Re: PATCH: _argument, a repeated local, again



On Nov 22,  5:59pm, Alexandre Duret-Lutz wrote:
} Subject: PATCH: _argument, a repeated local, again
}
} That was a local left in a while loop.

I'm not sure which version of _arguments you were diffing against; the
line "nm -eq compstate[nmatches] ]]; then" was replaced at least as far
back as zsh-workers/8603, and isn't present in -pws-9.  Here's the diff
against -pws-9 plus zsh-workers/8722.

Index: Completion/Base/_arguments
===================================================================
@@ -166,7 +166,7 @@
 if comparguments -i "$autod" "$@"; then
   local nm="$compstate[nmatches]" action noargs aret expl local
   local next direct odirect equal single match matched ws tmp1 tmp2
-  local opts subc
+  local opts subc prefix suffix
 
   if comparguments -D descr action; then
     comparguments -C subc
@@ -289,8 +289,6 @@
       if [[ -n "$opts" && -z "$aret$matched" &&
             nm -ne compstate[nmatches] ]] &&
           _requested arguments; then
-
-        local prefix suffix
 
         prefix="${PREFIX#*\=}"
         suffix="$SUFFIX"

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com



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