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

Re: 4.3.17 unset RPS1 vs RPROMPT



On Fri, 29 Jun 2012 02:40:46 -0700
Phil Pennock <zsh-workers+phil.pennock@xxxxxxxxxxxx> wrote:
> Using "prompt walters", I get a green right-prompt.
> Using "prompt pdp" to invoke my own setup, I still have it.
> I debug.  I have "unset RPS1" in my setup function.
> Strange, try at command-line.
> 
>  unset RPS1       # no effect
>  unset RPROMPT    # works

I'm still not really following what you're trying to do, but my guess is
you're not actually trying to unset the variable at all, you're trying
to set it to an empty string.  They may sound similar, and they often
have the same effect, but they are different things.  If the variable is
unset, it is indeed uncoupled from anything else that's going on, which
is kind of what unset means.  So unsetting an unset variable does indeed
have no effect.

As far as I can see the prompt functions never try to unset the prompts.
I'd suggest you use "RPS1=" to make the prompt empty.

-- 
Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/



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