Answers for "How to check if you are in tmux bash"

0

How to check if you are in tmux bash

if [[ "$TERM" =~ "screen".* ]]; then
  echo "We are in TMUX!"
else
  echo "We are not in TMUX :/  Let's get in!"
  # Launches tmux in a session called 'base'.
  tmux attach -t base || tmux new -s base
fi
Posted by: Guest on May-04-2021

Code answers related to "How to check if you are in tmux bash"

Browse Popular Code Answers by Language