Created
December 18, 2018 22:02
-
-
Save mattolenik/2ee2731f47051d47fb8794168fee0b3d to your computer and use it in GitHub Desktop.
Single command to create/join a tmux 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
# Creates/joins a shared session using session groups (-t option). | |
# This simplifies making a shared group. Just invoke tmuxx from anywhere | |
# and it'll always join to the same, shared session. | |
# | |
# Parameters: | |
# $1 the name of the session group, defaults to 'main' | |
tmuxx () { | |
local session="${1:-main}" | |
tmux new-session -t "$session" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment