I have this in my .zshrc:
if [ -z $TMUX ]; then; tmux-start; fi
It works well for terminal and terminal vim.
But for MacVim, I get this:

There is a tmux inside :terminal (see black bar at the bottom of the screenshot). I would like to disable tmux in macvim because I don't think it makes much sense. Maybe if I could test against an environment variable like $MACVIM available inside a :terminal, I would be able to disable this.