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

Re: Bug with the new prompt redraw code



On Sun, 11 Jul 2004, Peter Stephenson wrote:

> > > > (1) zle-line-init runs before the prompt is displayed
> 
> > Also it doesn't address (1) but then maybe that doesn't matter.
> 
> I could be convinced it does, but see if this makes the problem go away
> first.

I can confirm that this does print the prompt that was assigned during
zle-line-init, rather than the garbage that was output before the patch.

So, what about (1)?  To repeat, the intent was to display a multi-line 
prompt immediately after a command finishes, but then refresh only the 
last line of that prompt on subsequent zle redisplays (the original 
example involved SIGWINCH handling).

An almost-equivalent thing can be achieved by using "print -P" from the
precmd function instead of by assignment to PS1, but there's a question
of whether other commands in zle-line-init should affect values that are
substituted into the prompt (e.g. $psvar).



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