My .zshenv
produces some output that is only helpful when my shell is interactive.
In other cases when the shell is not interactive this output (i.e. when I run script) must be hidden.
How can I suppress .zshenv
output for non-interactive shell?
P.S. I added my current solution below but it seems hackish to me.