Skip to content

Instantly share code, notes, and snippets.

@diginc
Created May 14, 2014 18:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save diginc/b329c4a84a274c906aa6 to your computer and use it in GitHub Desktop.
Save diginc/b329c4a84a274c906aa6 to your computer and use it in GitHub Desktop.
tmux session start / resume function
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