I am trying to bind X
to do the following:
- prompt the user whether the session should be killed
- if
y
is entered, kill the session - after the session is killed select another session (last, previous, or next session)
Some similar commands that aren't quite right
Kill the session and close the terminal:
bind X confirm-before -p "Kill #S (y/n)?" kill-session
Prompt the user for the name of the session to kill and select next session after kill:
bind X command-prompt -p "kill:" "switch-client -n \; kill-session -t '%%'"
I haven't been able to find examples of similar commands. Here's a solution something that doesn't work:
bind X confirm-before -p "Kill #S (y/n)?" "SESSION='#S' \; \ switch-client -n \; kill-session -t \"$SESSION\""