Created
February 21, 2017 11:06
-
-
Save enricobacis/cd020771ab15f4f3b9983f729055d859 to your computer and use it in GitHub Desktop.
lazy tmux
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
#!/bin/bash | |
WHOAMI=$(whoami) | |
if tmux has-session -t $WHOAMI 2>/dev/null; then | |
tmux -2 attach-session -t $WHOAMI | |
else | |
tmux -2 new-session -s $WHOAMI | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment