Skip to content

Instantly share code, notes, and snippets.

@mattolenik
Created December 18, 2018 22:02
Show Gist options
  • Save mattolenik/2ee2731f47051d47fb8794168fee0b3d to your computer and use it in GitHub Desktop.
Save mattolenik/2ee2731f47051d47fb8794168fee0b3d to your computer and use it in GitHub Desktop.
Single command to create/join a tmux session
# 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