From 822f11875b08394d4eb482701c39e4ecdedc77ba Mon Sep 17 00:00:00 2001 From: Ben Grande Date: Wed, 27 Dec 2023 15:56:24 +0100 Subject: [PATCH] fix: tmux script printing extraneous output --- files/tmux/.local/bin/ta | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/tmux/.local/bin/ta b/files/tmux/.local/bin/ta index f1428f8..8536f72 100755 --- a/files/tmux/.local/bin/ta +++ b/files/tmux/.local/bin/ta @@ -79,13 +79,13 @@ main(){ else ## Outside of tmux. - if test -n "$ta_session" && ! tmux list-session 2>/dev/null; then + if test -n "$ta_session" && ! tmux list-sessions >/dev/null 2>&1; then ## Session name was specified but server is not running. tmux new-session -s "$ta_session" tmux display-message "Created session $ta_session" return 0 - elif ! tmux list-session 2>/dev/null; then + elif ! tmux list-sessions >/dev/null 2>&1; then ## Server is not running. ta_new || return 1 tmux new-session -s "$ta_name"