diff options
Diffstat (limited to 'tmuxsh/_tmux_kill_session,--.close.current.session')
-rwxr-xr-x | tmuxsh/_tmux_kill_session,--.close.current.session | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tmuxsh/_tmux_kill_session,--.close.current.session b/tmuxsh/_tmux_kill_session,--.close.current.session new file mode 100755 index 0000000..24b895a --- /dev/null +++ b/tmuxsh/_tmux_kill_session,--.close.current.session @@ -0,0 +1,7 @@ +#!/usr/bin/env sh +if [ "$(tmux list-sessions | wc -l)" = 1 ]; then + tmux confirm-before -p "Only single session active, kill-server instead (y/n)?" kill-server +else + tmux confirm-before -p "Kill #S session (y/n)?" "run-shell 'tmux switch-client -p \; kill-session -t \"#S\"'" + # tmux confirm-before -p "Kill #S session (y/n)?" "run-shell 'tmux switch-client -l \; kill-session -t \"#S\"'" +fi |