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

Re: positioning of RPS1



On 03/24/2018 12:44 PM, Ray Andrews wrote:
I remember reading something about zsh needing to calculate the actual width of the promps but I can't find it.  Does someone have a fast fix, or a reference in the docs?

I don't have a fast fix but I do recall what you're talking about.

I think the trick was to put non-printing characters (like escape sequences) inside of "%{…}" sequences. That tells Zsh not to use characters in that sequence as printable characters when calculating the prompt width. I believe the same thing applies to both PROMPT and RPROMPT.



--
Grant. . . .
unix || die

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature



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