Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: SHLVL not updated in environment



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?



Messages sorted by: Reverse Date, Date, Thread, Author