Skip to content

Instantly share code, notes, and snippets.

@hackedhead
Created April 13, 2018 19:45
Show Gist options
  • Save hackedhead/d3ed7236ba36b2788db2a9f8589ebfa0 to your computer and use it in GitHub Desktop.
Save hackedhead/d3ed7236ba36b2788db2a9f8589ebfa0 to your computer and use it in GitHub Desktop.
function tmuxa() {
# check if tmux session exists
ths "$1"
FOUND=$?
if [ -z "$1" ]
then
tmux ls
elif [ $FOUND -eq 0 ]
then
tmux attach -t "$1"
else
tmux new -s "$1"
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment