$SHLVL  –  Zsh Nesting Level

$SHLVL contains the level of nested Z shells.

Examples

Print the nesting level of the Zsh process
1
echo $(echo $(echo $SHLVL))
Output:
1
2
BashSupport Pro is a Zsh IDE with support for $SHLVLtry it now!
© 2020–2024 Joachim Ansorg
Imprint
Privacy Policy
Legal