Skip to content

Instantly share code, notes, and snippets.

@mgirouard
Created July 7, 2015 15:01
Show Gist options
  • Save mgirouard/06a245f3b1f2f7cc369b to your computer and use it in GitHub Desktop.
Save mgirouard/06a245f3b1f2f7cc369b to your computer and use it in GitHub Desktop.
#!/bin/bash
t() {
if $(tmux list-sessions &> /dev/null); then
tmux attach
else
[[ $1 == "" ]] && SESSION_NAME='MISC' || SESSION_NAME=$1
tmux new-session -s $SESSION_NAME
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment