When I press Ctrl+b, W, tmux shows the list of all current windows and their panes. How can I kill a window and its panes from within this list view?
1 Answer
This is a new capability of the choose-tree
feature in tmux 2.8. From tmux(1):
Key Function Enter Choose selected item Up Select previous item Down Select next item x Kill selected item
So after you've navigated to the right window, press x
, then when you are prompted:
Kill window 1?
...press y
to accept. This also works for killing individual panes, or even whole sessions.
-
-
@GeorgeUdosen Which version of
tmux
are you using? This is new in 2.8. (Editing my answer to mention this.) Dec 14, 2018 at 17:53 -
-
I have
tmux-2.8
installed from sources here. I can confirm it works. Killed a windows with 2 panes just for testing. BTW i have never needed this feature, but is good to know that it exists :)– user34720Dec 14, 2018 at 18:42