From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12099 invoked by alias); 10 Feb 2014 16:39:18 -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: 32374 Received: (qmail 19844 invoked from network); 10 Feb 2014 16:39:12 -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=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.2 From: Frank Terbeck To: zsh-workers@zsh.org Subject: Unset special parameters User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux) Organisation: 63797068657270756e6b Date: Mon, 10 Feb 2014 17:08:54 +0100 Message-ID: <87vbwn9ch5.fsf@ft.bewatermyfriend.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Df-Sender: NDMwNDQ0 Hi list, Since commit f3e7cfe47c32a23, some special parameters are initialised to be unset. Among them PS1 and RPS1. Which means that prompt-themes need to mark these parameters as global, because otherwise shells running with =E2=80=98warn_create_global=E2=80=99 set will complain. When I was trying to do that in my own theme, I was first trying this (quite simplified): #+BEGIN_SRC shell-script prompt_ft_precmd () { # ... typeset -g RPS1 RPS1=3D'foo' # ... } #+END_SRC ...which still triggers the warning. Only when I assign a value to RPS1 in the typeset call, the warning goes away: #+BEGIN_SRC shell-script prompt_ft_precmd () { # ... typeset -g RPS1=3D'foo' # ... } #+END_SRC Is this a bug? Because, if I do this with a non-special parameter, it works the way I'd expect it to: [snip] zsh% foo () { typeset -g BAR BAR=3Dthingy } zsh% foo zsh% echo $BAR thingy [snap] Regards, Frank --=20 In protocol design, perfection has been reached not when there is nothing left to add, but when there is nothing left to take away. -- RFC 1925