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

Re: PATCH: New completions



I wrote:

> This didn't apply after 6689, so here is a modified patch for that --
> with some other changes (I hope you find them acceptable). The list
> looks more like a select list and I avoided using `compgen -s'.

Oops... we should still be able to complete parameter names, I think
(unfortunately this may make the list much too long for the screen).

Bye
 Sven

diff -u oc/Base/_subscript Completion/Base/_subscript
--- oc/Base/_subscript	Fri Jun 18 12:02:08 1999
+++ Completion/Base/_subscript	Fri Jun 18 12:32:56 1999
@@ -8,7 +8,10 @@
   else
     compadd -S ']' - "${(@kP)${compstate[parameter]}}"
   fi
-elif [[ ${(Pt)${compstate[parameter]}} = array* ]]; then
+  return
+fi
+
+if [[ ${(Pt)${compstate[parameter]}} = array* ]]; then
    ind=( {1..${#${(P)${compstate[parameter]}}}} )
    list=()
    for i in "$ind[@]"; do
@@ -21,6 +24,6 @@
   else
     compadd -S ']' -y list - "$ind[@]"
   fi
-else
-  _compalso -math-
 fi
+
+_compalso -math-

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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