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

Re: positioning of RPS1



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.


Thanks Grant, that's what I was hunting for: %{ ... %}.  Interesting that it
effects RPS1, I'd have thought that it sorta just attaches itself to the right
margin and that the width of PS1 wouldn't matter to it that much, but I suppose
that's naive, the entire prompt is worked out in one calculation.



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