mirror of
https://github.com/tmate-io/tmate.git
synced 2024-11-27 10:33:09 +01:00
14 lines
275 B
Bash
14 lines
275 B
Bash
|
#!/bin/sh -x
|
||
|
|
||
|
[ ! -z "$TMUX" ] && exit
|
||
|
|
||
|
# I alias this script to "session" in .profile and use it to reconnect to
|
||
|
# the main session (0) on my main tmux server.
|
||
|
|
||
|
SOCKET=/tmp/tmux-1000-main
|
||
|
|
||
|
TMUX="tmux -S $SOCKET"
|
||
|
|
||
|
$TMUX has -s0 2>/dev/null || $TMUX start
|
||
|
$TMUX attach -d -s0
|