Skip to content

Instantly share code, notes, and snippets.

@yoshuki
Created September 28, 2010 13:31
Show Gist options
  • Save yoshuki/600991 to your computer and use it in GitHub Desktop.
Save yoshuki/600991 to your computer and use it in GitHub Desktop.
SESSION_NAME='t'
tmux has-session -t $SESSION_NAME
if [ $? -ne 0 ]; then
tmux -q new-session -s $SESSION_NAME
elif [ "$TMUX" = "" ]; then
echo '==== tmux ========================================'
tmux list-clients
echo "tmux attach-session -d -t $SESSION_NAME"
echo '======================================== tmux ===='
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment