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

Re: Missplaced rpromt when using colored prompt



Christian H. Stork (cstork@xxxxxxxxxxx) wrote:
> when using the following settings
> 
> PROMPT='%B^[[31m%n@%m%#^[[30m%b '
> RPROMPT='%~'
> 
> the rprompt keeps a margin of 8 characters from the right.  This looks
> like a bug to me.

It's not a bug; you just forgot to wrap the escape sequences in 

  %{ ... %}

>From the docs:

  %{...%}
       Include a string as a literal escape sequence.  The string within
       the braces should not change the cursor position.  Brace pairs can
       nest.



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