From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27927 invoked from network); 20 Sep 2004 14:21:00 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 20 Sep 2004 14:21:00 -0000 Received: (qmail 27642 invoked from network); 20 Sep 2004 14:20:54 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 20 Sep 2004 14:20:54 -0000 Received: (qmail 27697 invoked by alias); 20 Sep 2004 14:20:40 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 20393 Received: (qmail 27680 invoked from network); 20 Sep 2004 14:20:39 -0000 Received: from unknown (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 20 Sep 2004 14:20:39 -0000 Received: (qmail 26830 invoked from network); 20 Sep 2004 14:19:44 -0000 Received: from moonbase.zanshin.com (64.84.47.139) by a.mx.sunsite.dk with SMTP; 20 Sep 2004 14:19:41 -0000 Received: from toltec.zanshin.com (toltec.zanshin.com [64.84.47.166]) by moonbase.zanshin.com (8.13.1/8.13.1) with ESMTP id i8KEJdq7011093 for ; Mon, 20 Sep 2004 07:19:39 -0700 Date: Mon, 20 Sep 2004 07:19:39 -0700 (PDT) From: Bart Schaefer Reply-To: zsh-workers@sunsite.dk To: Zsh hackers list Subject: Re: PATCH: SHLVL not updated in environment In-Reply-To: <200409201309.i8KD9QuP007197@news01.csr.com> Message-ID: References: <200409201309.i8KD9QuP007197@news01.csr.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=-0.0 required=6.0 tests=BAYES_44 autolearn=no version=2.63 X-Spam-Hits: -0.0 On Mon, 20 Sep 2004, Peter Stephenson wrote: > % zsh > % print $SHLVL > 3 > % printenv SHLVL > 2 > > This is a bug, right? I'm not missing some extreme sublety? That seems to be the way it worked before 4.2.1. > It seems that SHLVL has to be exported for it to work, although the > documentation doesn't explicitly indicate it always will be exported. It *is* always exported, though: schaefer[520] zsh -f toltec% typeset -p SHLVL typeset -i10 -x SHLVL=2 > Is this the right fix, rather than reversing the sense of the test? I think it's right, but it begs the question: What changed from 4.2.0 to make this fix necessary?