mirror of
https://github.com/zoriya/flake.git
synced 2026-06-03 10:57:13 +00:00
Only close tmux session on top level shell exit
This commit is contained in:
@@ -237,7 +237,7 @@
|
|||||||
# Create a new tmux session (with a random name) and attach.
|
# Create a new tmux session (with a random name) and attach.
|
||||||
if [[ -z "$TMUX" ]]; then
|
if [[ -z "$TMUX" ]]; then
|
||||||
exec tmux -u new-session -s "#$(hexdump -n 4 -v -e '/1 "%02X"' /dev/urandom)"
|
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")
|
session=$(tmux display-message -p "#S")
|
||||||
# kill current sesion if we are quiting the only pane
|
# kill current sesion if we are quiting the only pane
|
||||||
function __onExit {
|
function __onExit {
|
||||||
|
|||||||
Reference in New Issue
Block a user