From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15817 invoked by alias); 29 Jun 2012 09:56:51 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 30545 Received: (qmail 15276 invoked from network); 29 Jun 2012 09:56:40 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00,DKIM_ADSP_ALL, DKIM_SIGNED,RCVD_IN_DNSWL_MED,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at spodhuis.org does not designate permitted sender hosts) 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=; Date: Fri, 29 Jun 2012 02:40:46 -0700 From: Phil Pennock To: zsh-workers@zsh.org Subject: 4.3.17 unset RPS1 vs RPROMPT Message-ID: <20120629094045.GA96213@redoubt.spodhuis.org> Mail-Followup-To: zsh-workers@zsh.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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? -Phil