Thursday, March 15, 2012

tmux disable confirmation prompt on kill-window

SkyHi @ Thursday, March 15, 2012
By default  & is bound to confirm-before -p "kill-window #W? (y/n)" kill-window. The use of confirm-before causes the prompting. If you do not want the confirmation prompt, then just rebind & directly to kill-window:
bind-key & kill-window
You may also want to rebind x, too. It defaults to a confirming version of kill-pane; though you might want to consider whether this one might be too easy to accidentally type before removing the confirmation.
bind-key x kill-pane
Note: Both examples above are suitable for direct inclusion in .tmux.conf, but you could also type them into a  : prompt, or type them into a shell after tmux (though you would have to quote/escape & since it usually special to the shell).
I think those are the only default bindings that use confirm-before. You can check your particular configuration like this:
tmux list-keys | grep confirm-before