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

Re: Problem with 'predict-on'



* Bart Schaefer (2004-03-24 17:45 +0100)
> On Mar 24,  5:18am, Thorsten Kampe wrote:
> } I'm testing the ZLE widget "predict-on" with...
> 
> predict-on is probably due for an overhaul.  It was written for 3.1.x
> (I've forgotten which value of 'x') and only updated once about a year
> ago.
> 
> } autoload -U predict-on; predict-on
> 
> } This means that predict-on is active by default.
> 
> Actually a better way to accomplish this is
> 
> zle-line-init() { predict-on }
> zle -N zle-line-init
> 
> Calling predict-on in .zshrc means it's on for the very first prompt,
> but zle-line-init makes sure it's on at the beginning of every prompt.

It works in 4.2 (but not 4.1.X). And the problems with pasting seem to
be only a problem with the 4.1 Cygwin zsh and not my 4.2.0 Linux zsh.

But I think the real culprit is *toggle*. It should turn off
predict-on when predict-on doesn't make sense. But toggle turns off
predict-on as soon as I type my first character (and that *really*
doesn't make sense)

Thanks, Thorsten

[1]
autoload -U predict-on; predict-on

zle-line-init() { predict-on }
zle -N zle-line-init

zle -N predict-on
zle -N predict-off

bindkey '^Z'   predict-on
bindkey '^X^Z' predict-off

zstyle ':predict' toggle true
zstyle ':predict' verbose true



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