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

Odd behavior when zle-line-init has an error



The easiest way to see this is like so:

zsh -f
zle -N zle-line-init

That is, bind zle-line-init to a function that doesn't exist, then notice
that there's an extra blank line after the prompt and that the error is
not displayed until after the first keystroke interacting with the editor.

Then try something a bit more egregious:

zle-line-init() { typeset -T KILLRING killring }

Now the error DOES get displayed, but the prompt still doesn't redraw
until you begin interacting with the editor.  Also, that typeset appears
to be an abort-level error; the following produces no change in behavior:

zle-line-init() { typeset -T KILLRING killring; zle -R }

However, this "works":

zle-line-init() { { typeset -T KILLRING killring } always { zle -R } }



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