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

Bug report: Strange behaviour of $SHLVL in subshell.



Hi, 

To me, the following is not logical/expected behaviour:

    $ echo $SHLVL
    1
    $ zsh -c 'echo $SHLVL'
    2
    $ zsh -c '(echo $SHLVL)'
    1

I’d just like to know if it is a bug, or has some kind of explanation.

Thanks, 
Eliseo Martínez.


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