$ZSH_EVAL_CONTEXT
–
Context of executed code
$ZSH_EVAL_CONTEXT
is a colon-separated list of the context types of the currently executed code.
Links
BashSupport Pro is a Zsh IDE with support for $ZSH_EVAL_CONTEXT – try it now!