Created
November 28, 2020 16:31
-
-
Save huntie/2a851708285299750dec4411ab835d63 to your computer and use it in GitHub Desktop.
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment