Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: 4.3.17 unset RPS1 vs RPROMPT
- X-seq: zsh-workers 30546
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: 4.3.17 unset RPS1 vs RPROMPT
- Date: Fri, 29 Jun 2012 12:02:13 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=u9pIdcOLMZnUlnfHky1vp9g6F8/9v86zXAN4IvYMeI4=; b=YaY1DzZJcy/dJktN4MLReMdN62Gwl/tRrbfz93C0jWlCx46DQEdE1cUnFcJwTnkCQA 9sszSfDrFfvi8mXG38EaNbDPmYInUTd6biLXdghMkrPd0HqHv4X3sgtZ05xnjWfdqzha UCKD46QxdRQVSBbCIIFMPksMGLAlo80OOwhsSAPnq4jLntLeuV4bVZ9ol0YC+/e4Qd2D qjkNw2oUnidE8i/TiIhFpCAP1ZG9frrFy0ZdlRT3DtVmTpU45IHnD6XVu9qNRodr6gWA 6w2l84gW3SA1PwK8X/hC9GjLKA5ALmhjyvcBUs+3YxkJxaOay43Zl9lEoTAvo4R4Q2uU 6MGg==
- In-reply-to: <20120629094045.GA96213@redoubt.spodhuis.org>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20120629094045.GA96213@redoubt.spodhuis.org>
On 29/06/2012, Phil Pennock <zsh-workers+phil.pennock@xxxxxxxxxxxx> wrote:
> 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:
> IPDEF7("RPS1", &rprompt),
> IPDEF7("RPROMPT", &rprompt),
>
> 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
> decoupled?
>
> 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.
>
> Thoughts?
Does it help if you remove the 'export's in prompt_walters_setup?
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author