Skip to content

Instantly share code, notes, and snippets.

@ajorgensen
Created March 26, 2014 15:25
Show Gist options
  • Save ajorgensen/9785953 to your computer and use it in GitHub Desktop.
Save ajorgensen/9785953 to your computer and use it in GitHub Desktop.
#!/bin/bash
tmux has-session -t $1 2>/dev/null
if [ "$?" -eq 1 ]; then
tmux new -s $1
else
tmux attach -t $1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment