diff --git a/.zshrc b/.zshrc index 3070aa8..47e1e96 100644 --- a/.zshrc +++ b/.zshrc @@ -112,3 +112,14 @@ eval $(thefuck --alias) eval $(thefuck --alias fk) zinit light Aloxaf/fzf-tab + +if [[ -z "$TMUX" ]]; then + tmux has-session &> /dev/null + if [ $? -eq 1 ]; then + exec tmux new -s ssh_session + exit + else + exec tmux attach -t ssh_session + exit + fi +fi