0

For TMUX, we know there is a confirm-before option for kill-window. For example, posts

How to add tmux confirm prompt when I kill a window? tmux disable confirmation prompt on kill-window

Wonder if there is confirm-before option for kill-session command

0

1 Answer 1

0

we know there is a confirm-before option for kill-window.

No, confirm-before is not an option for kill-window. It's a tmux command like kill-window. The difference is confirm-before upon confirmation executes another command (e.g. kill-window):

confirm-before [-b] [-p prompt] [-t target-client] command

(alias: confirm)
Ask for confirmation before executing command. […]

(source)

There is this default binding that runs confirm-before -p "kill-window #W? (y/n)" kill-window and maybe this is why you thought confirm-before was specific to kill-window. Well, it's not specific.

The other command (i.e. command) may be kill-session as well. To see for yourself, type the following in the tmux prompt (note: the default key binding to open the prompt is Ctrl+b,:):

confirm-before kill-session

and hit Enter. Or invoke this in a shell running inside tmux:

tmux confirm-before kill-session

The other command may be confirm-before. You can do this (again shell code):

tmux confirm-before -p 'kill?' 'confirm-before -p "sure?" "confirm-before -p \"really?\" kill-session"'

where confirm-before runs confirm-before that runs confirm-before that runs kill-session.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .