From 83d1ec948ab08fb64b8ed6d414d646a5578a9312 Mon Sep 17 00:00:00 2001 From: thek4n Date: Tue, 16 Apr 2024 13:31:32 +0300 Subject: [PATCH] fix(tmux): check is server running before connecting --- home/user/.bashrc | 2 +- home/user/.config/zsh/.zshrc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/home/user/.bashrc b/home/user/.bashrc index decf2fa..c7e436c 100644 --- a/home/user/.bashrc +++ b/home/user/.bashrc @@ -7,7 +7,7 @@ if \ [[ ! "$TERM" =~ tmux ]] && \ command -v tmux &>/dev/null then - if tmux -N -L "$USER" server-info &>/dev/null; then + if tmux -N -L "$USER" list-sessions &>/dev/null; then if [ -n "$SSH_CLIENT" ]; then exec tmux -N -L "$USER" new-session else diff --git a/home/user/.config/zsh/.zshrc b/home/user/.config/zsh/.zshrc index e24ea6a..c39fc80 100644 --- a/home/user/.config/zsh/.zshrc +++ b/home/user/.config/zsh/.zshrc @@ -7,7 +7,7 @@ if \ [[ ! "$TERM" =~ tmux ]] && \ command -v tmux &>/dev/null then - if tmux -N -L "$USER" server-info &>/dev/null; then + if tmux -N -L "$USER" list-sessions &>/dev/null; then if [ -n "$SSH_CLIENT" ]; then exec tmux -N -L "$USER" new-session else