Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Multiline prompt woes
- X-seq: zsh-users 16121
- From: Norbert Zeh <nzeh@xxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Multiline prompt woes
- Date: Wed, 29 Jun 2011 12:02:22 -0300
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
Hi there,
I've run into a somewhat annoying issue with multi-line prompts (even really
simple ones, such as "\n%~"). When the terminal is redrawn, for example
because of resizing the terminal window, the prompt gets messed up. I don't
know how to describe this easily, but an example should make it clear. Say my
multiline prompt is
LINE 1
LINE 2
%
Then, after redrawing, the screen shows
LINE 1
LINE 2
LINE 1
LINE 2
%
My suspicion is that zsh redraws the prompt upon resizing the window, and to do
this it simply goes back to the beginning of the current line (the third one),
and then draws the prompt from there, thereby duplicating the first two lines.
Interestingly enough, repeated resizing of the window does not lead to copies
of the first two lines to pile up. It happens only once. Once I run a
command, however, I can trigger the same behaviour with the next prompt again.
So, is there anything special I need to do to get zsh to handle multiline
prompts correctly? Is this a bug? If so, is it known? Any feedback would be
appreciated.
Cheers,
Norbert
Messages sorted by:
Reverse Date,
Date,
Thread,
Author