Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I've looked through the man pages so this might be asking in vain. I get annoyed at the confirmation message for kill-window (Ctrl-b & or Ctrl-b kill-window on the default setup). This always gives:

Confirm 'kill-window'? (y/n)

Personally, I would essentially never hit Ctrl-b & unintentionally. Is there any way to disable this prompt, or prompts in general in tmux?

share|improve this question
add comment

1 Answer 1

up vote 8 down vote accepted

By default <Prefix> & 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 <Prefix> : 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
share|improve this answer
1  
... hallelujah! –  Purrell Jan 29 '12 at 22:37
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.