Created
October 27, 2020 15:07
-
-
Save Edo78/6f25606587774a91260d31c9b2f2f7f6 to your computer and use it in GitHub Desktop.
Shell function that wrap around tmux and create/attach to a "default" session or to a named one
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
tm() { | |
if [[ -n $1 ]] | |
then | |
sessionname=$1 | |
else | |
sessionname='default' | |
fi | |
tmux new-session -A -s $sessionname | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
With this function you can call tmux just with
tm
to create or attach to a session nameddefault
or you can calltm <session-name>
to create or attach to a session name<session-name>