Skip to content

Instantly share code, notes, and snippets.

@MvRens
Created January 17, 2022 09:14
Show Gist options
  • Save MvRens/713f431f198cf144a89f9f697a5380e3 to your computer and use it in GitHub Desktop.
Save MvRens/713f431f198cf144a89f9f697a5380e3 to your computer and use it in GitHub Desktop.
TMux auto-start
# Auto-attach tmux
if command -v tmux &> /dev/null && [ -n "$PS1" ] && [[ ! "$TERM" =~ screen ]] && [[ ! "$TERM" =~ tmux ]] && [ -z "$TMUX" ]; then
exec tmux a
else
export TERM=xterm-256color
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment