From 13c83fb8b4ab5e3ba895ee076e1477b8df4c934e Mon Sep 17 00:00:00 2001
From: Oliver Davies <oliver@oliverdavies.dev>
Date: Tue, 20 Aug 2024 18:00:00 +0100
Subject: [PATCH] Hide error about nested tmux sessions

---
 lib/shared/scripts/t.nix | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/shared/scripts/t.nix b/lib/shared/scripts/t.nix
index 5527a82c..d9f91e3b 100644
--- a/lib/shared/scripts/t.nix
+++ b/lib/shared/scripts/t.nix
@@ -78,7 +78,7 @@
         tmux new-session -d -c "$selected_path" -s "$session_name"
       fi
 
-      tmux switch-client -t "$session_name" || tmux attach-session -t "$session_name"
+      tmux switch-client -t "$session_name" 2>/dev/null || tmux attach-session -t "$session_name"
     }
 
     main "$@"