I\'m writing a shell script that creates / attaches or switches to a given session, depending on whether one is inside tmux and the session exists.
I\'ve got everything
Using this works for me:
TMUX= tmux new-session -d -s name tmux switch-client -t name
The TMUX= on the first line is required so tmux doesn't throw a sessions should be nested with care, unset $TMUX to force message.
TMUX=
sessions should be nested with care, unset $TMUX to force