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

Re: PROMPT escape sequences

On Monday 2007-10-08 13:13 +1000, Bart Schaefer output:
:On Oct 8, 11:22am, Geoff Wing wrote:
:} On Monday 2007-10-08 10:40 +1000, Bart Schaefer output:
:} :It "works" for %S because of a quirk in the way some terminals (xterm
:} :included) implement "standout mode", not because of anything zsh does
:} :differently.
:} Well, actually, it should be handling these correctly. For bold,
:} standout and underline.
:Hm.  If I do, in my xterm,
:% PS1='verylongstring%#%S '
:then the entire prompt, including the "verylongstring%", appears in
:reverse video.  Are you saying that it's ZLE that's spreading the
:standout mode to the left as well as to the right, and not just a
:quirk of xterm?

I haven't yet been able to have this occur. "verylongstring%" always stays
in normal (non-standout) attribute with rxvt and a quick test in xterm (215)
This was with the prompt near the right side and with it longer than column
width (i.e. wrapped onto next line).  Tried with both RPS1 set and unset,
w/ POSTEDIT unset; also from "zsh -f"

:To get what I'd expect, it's necessary to explicitly put in %s at
:the beginning of the prompt.
:% PS1='%sverylongstring%#%S '

:Further, if I type something at that prompt and then backspace over
:it, the reverse video gets left behind where the erased characters
:used to be.

Ah, well, I'd expect that.  I don't think it's necessarily a "wrong"


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