Created
July 24, 2017 07:43
-
-
Save zhuangya/83cc2fce533df531fe92a12b5931af53 to your computer and use it in GitHub Desktop.
t in shell
This file contains hidden or 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
new-session |
This file contains hidden or 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
t() { | |
if [ "$#" -eq 0 ] | |
then | |
tmux attach | |
else | |
tmux attach -t $@ || tmux new-session -s $@ | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment