Zsh Mailing List Archive
Messages sorted by:
4.3.17 unset RPS1 vs RPROMPT
- X-seq: zsh-workers 30545
- From: Phil Pennock <zsh-workers+phil.pennock@xxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: 4.3.17 unset RPS1 vs RPROMPT
- Date: Fri, 29 Jun 2012 02:40:46 -0700
- Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=spodhuis.org; s=d201107; h=Content-Type:MIME-Version:Message-ID:Subject:To:From:Date; bh=5pQmrxYsT7M+T9pR5AkA7M0YxzY+M6PO5bWePsZFXzE=; b=MGTfZ79KEnRT4GL2UVLoqLNCq0kArBFVmWjQVaZZjE4sxo7IzcSWXsdT59W6BtL3arvZf99pC8KQXB8JbI7cS75jj3lI8cDD81DKyAAgZD+lNDIyqFXrPMK2WMumo8KYvl8+q3++M6CQWrXJBuGE5YFaqWuJ4iPdcg7CJspktU8=;
- List-help: <mailto:firstname.lastname@example.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:email@example.com>
- Mail-followup-to: zsh-workers@xxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
zsh 4.3.17, multiple OSes.
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 see Src/params.c:
and I know that the docs claim them equivalent.
So try with "zsh -f", and it works. Some debugging later, and I find
that if I "unset RPS1" then "typeset -p RPS1 RPROMPT" shows just
RPROMPT, not both. If I then call "prompt walters", then RPROMPT will
be set and can only be cleared with "unset RPROMPT".
If I also "unset RPROMPT", then it comes back into being as a magic
variable during prompt setup. If I assign to RPS1, then it too comes
back as a magic variable bound to the same internal rprompt.
Is it expected that RPROMPT and RPS1 can be decoupled in this way?
Is there a correct way to clear the prompt, other than *always* having
to do "unset RPROMPT RPS1" because one or the other may have become
I don't see it documented and it seems very strange to me. I'd expect
that if one is unset, the rprompt content gets unset, but assigning to
either would instantiate the other again, since it can't be reused by a
user anyway -- if they unset and then assign to a new value, it still
changes the same C level "rprompt" variable.
Messages sorted by: