Files
zpower/files/tmux-local.zsh
Bradley Richins b25fde0812 Initial commit
2020-04-07 20:05:59 -06:00

9 lines
281 B
Bash

if [[ -z "$TMUX" ]] && [ "$SSH_CONNECTION" = "" ]; then
tmux has-session -t $(tty | sed 's/^.....//') 2>/dev/null
if [ $? != 0 ]; then
exec tmux new-session -s $(tty | sed 's/^.....//')
else
exec tmux attach-session -t $(tty | sed 's/^.....//')
fi
fi