Skip to content

Instantly share code, notes, and snippets.

Created November 28, 2020 16:31
What would you like to do?
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.
tmux ls | grep attached > /dev/null && tmux || tmux attach || tmux; exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment