Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: prompts with newlines get printed twice
On 24 September 2011 20:24, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> On Sep 23, 7:52pm, Jorge Israel Pena wrote:
> }
> } The problem I'm encountering is that when I create a newline in the prompt,
> } the prompt gets printed twice when I open the terminal.
>
> We've been wrestling with this one for a while. The trouble seems to be
> that Terminal sends extra WINCH (window size change) signals to the shell,
> which causes it to reprint the prompt.
>
> Zsh doesn't attempt to perform a cursor-up before printing the prompt, as
> for command line editing purposes it only keeps track of the appearance of
> the final line.
I'm seeing some strange behaviour here, when I resize after setting
PS1='%D{%s} hello
there '
I do get the first line twice, but subsequent resizes properly redraws
both lines in place, updating the time too. Pressing enter then causes
the next resize to double the first line and then subsequent ones work
again.
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author