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

Re: PATCH: Corrected style test in prediction



Bart Schaefer wrote:

> } The number of colons is still correct, but the original context name
> } was correct, too. The `predict' was stored in the `function' field of
> } the context name, indicating that completion was called from predict.
> 
> But in insert-and-predict we have:
> 
> 	  local crs curcontext="${curcontext}"
> 
>           [[ -z "$curcontext" ]] && curcontext=:::
>           curcontext="${curcontext#*:}predict:"
> 
> which makes the context be :completion:::predict::, with `predict' in
> the `command' field.  Surely the two should be the same?  If not, why
> not?

Ouch. Thanks for the hint.

Bye
 Sven

diff -ru ../z.old/Functions/Zle/predict-on Functions/Zle/predict-on
--- ../z.old/Functions/Zle/predict-on	Wed Feb 23 14:44:05 2000
+++ Functions/Zle/predict-on	Wed Feb 23 16:47:41 2000
@@ -56,7 +56,7 @@
 	  local crs curcontext="${curcontext}"
 
           [[ -z "$curcontext" ]] && curcontext=:::
-          curcontext="${curcontext#*:}predict:"
+          curcontext="predict:${curcontext#*:}"
 
 	  comppostfuncs=( predict-limit-list )
 	  zle complete-word

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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