From 88f3698e7666f456b3c9aa2a2057ea13e9118675 Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Fri, 13 Dec 2024 15:05:31 +0100 Subject: [PATCH] fixup! Only close tmux session on top level shell exit --- modules/cli/zsh/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/cli/zsh/default.nix b/modules/cli/zsh/default.nix index 8ea212f..23fbf42 100644 --- a/modules/cli/zsh/default.nix +++ b/modules/cli/zsh/default.nix @@ -237,7 +237,7 @@ # Create a new tmux session (with a random name) and attach. if [[ -z "$TMUX" ]]; then exec tmux -u new-session -s "#$(hexdump -n 4 -v -e '/1 "%02X"' /dev/urandom)" - else if [[ $SHLVL -eq 1 ]] + elif [[ $SHLVL -eq 1 ]]; then session=$(tmux display-message -p "#S") # kill current sesion if we are quiting the only pane function __onExit {