Start a tmux server if none exists, create a new session if tmux is in use, or reattach if no tmux sessions are connected - and exit after. Useful as the initial command for a terminal profile.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
|tmux ls | grep attached > /dev/null && tmux || tmux attach || tmux; exit|