Skip to content

Instantly share code, notes, and snippets.

@AndrewVos
Created July 1, 2013 10:23
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 AndrewVos/5899790 to your computer and use it in GitHub Desktop.
Save AndrewVos/5899790 to your computer and use it in GitHub Desktop.
if [ -z "$TMUX" ]; then
SESSION=$USER
tmux has-session -t $SESSION
if [ $? -eq 0 ]; then
tmux attach-session -d -t $SESSION
exit 0;
fi
tmux new-session -s $SESSION
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment