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

Re: When RPROMPT != RPS1

On Mon, Jul 31, 2017 at 9:24 AM, Jim <linux.tech.guy@xxxxxxxxx> wrote:
> Built 5.3.1-dev-1 with your changes.  Upon testing, I found that the
> original
> issues of the right prompt is still there when switching between walters
> and either bart or adam2. The right prompt appears on the right side of
> second line of the prompt.

That's intentional.  It's up to each theme to determine how much of
the preexisting state should be replaced; if the theme doesn't
explicitly do anything with RPS1, then it remains when switching.

To get the effect you are after, you should be doing three steps:
  prompt walters
  prompt restore
  prompt adam2
(or whatever).  "prompt default" or "prompt off" would also be
possible as the middle step.

> But unlike previous versions of zsh where
>   unset RPROMPT
> was needed to remove the unwanted prompt, you now have to type
>   unset RPS1
> ??

Yes, the intent of the change to "walters" was to make it consistent
in that you can always "unset RPS1" rather than having to use one
parameter name for some prompts and the other name for others.  It
didn't otherwise affect anything

> BTW, was there any reason for changing walters' appearance? It
> now does underlining instead of the colors as in previous versions
> of zsh.

There has been no change to "prompt walters", it has always used %U/%u
in PS1 and color (default green) in RPS1.  However, the interpretation
of %U is specific to the termcap/terminfo definition of the current
terminal, so it's possible that's affecting something you see.

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