summaryrefslogtreecommitdiff
path: root/tmuxsh/_tmux_kill_session,--.close.current.session
blob: 24b895a5a0500bce54b5e964e3987dd5f1b331ad (plain)
1
2
3
4
5
6
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