Only close tmux session on top level shell exit

This commit is contained in:
2024-12-13 12:34:04 +01:00
parent a46585d152
commit 7288d53da3
+1 -1
View File
@@ -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
else if [[ $SHLVL -eq 1 ]]
session=$(tmux display-message -p "#S")
# kill current sesion if we are quiting the only pane
function __onExit {