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

[bug] $SHLVL decremented for the last command of a subshell



(from https://unix.stackexchange.com/questions/304917/detect-when-zsh-is-running-within-the-subshell-of-another-shell)

$ printenv SHLVL
1
$ (printenv SHLVL)
0
$ (printenv SHLVL;:)
1
$ (:;printenv SHLVL)
0


http://www.zsh.org/mla/workers/1999/msg02472.html
sounds like a potential culprit.

-- 
Stephane



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