Answers:
您可以使用“ kill-pane”命令。
kill-pane [-a] [-t target-pane]
(alias: killp)
Destroy the given pane. If no panes remain in the containing window, it is also destroyed. The -a option kills all but the pane given with -t.
因此,例如,如果您想杀死除窗格0以外的所有窗格:
kill-pane -a -t 0
如果您不知道窗格编号是什么,则可以使用“ display-panes”命令:
display-panes [-t target-client]
(alias: displayp)
Display a visible indicator of each pane shown by target-client. See the display-panes-time, display-panes-colour, and display-panes-active-colour
session options. While the indicator is on screen, a pane may be selected with the '0' to '9' keys.
swap-pane -U
命令的hacky选项将窗格移至位置0,然后移至kill-pane -a -t 0
。
tmux kill-pane -a
杀死除当前窗格以外的所有窗格。-t
如果您喜欢当前窗格,则无需指定目标。
还有“ ^ b!” 根据http://www.dayid.org/os/notes/tm.html(我也尝试过,它对我有用)