Created
May 14, 2014 18:49
-
-
Save diginc/b329c4a84a274c906aa6 to your computer and use it in GitHub Desktop.
tmux session start / resume function
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
function tm { | |
TMUXNAME=${1:-"default"} | |
if tmux ls | grep "^$TMUXNAME:"; then | |
tmux attach -d -t $TMUXNAME | |
else | |
tmux new -s $TMUXNAME | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment