From 655107f38f1ecdf0ee129b253ccb011445b0477f Mon Sep 17 00:00:00 2001 From: Fredrik Ekre Date: Tue, 28 Feb 2023 11:12:50 +0100 Subject: [PATCH] [tmux] Silence tmux ls output when no server running. --- .bashrc.dotfiles | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bashrc.dotfiles b/.bashrc.dotfiles index dc8aec5..3b36115 100644 --- a/.bashrc.dotfiles +++ b/.bashrc.dotfiles @@ -30,7 +30,7 @@ fi # Start tmux by default if command -v tmux &> /dev/null && [ -z "$TMUX" ]; then - if tmux ls | grep "default: " > /dev/null; then + if grep "default: " <(tmux list-sessions 2> /dev/null) > /dev/null; then tmux attach -t default else tmux new -s default