Created
April 13, 2018 19:45
-
-
Save hackedhead/d3ed7236ba36b2788db2a9f8589ebfa0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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