現在のウィンドウを除いてtmuxのすべてのウィンドウを閉じる方法

現在のウィンドウを除いてtmuxのすべてのウィンドウを閉じる方法

私の好きな設定ウィンドウへのキーバインディングがありますが、時には状況が乱れたり制御できなくなり、すべてのウィンドウを閉じてスクリプトを再実行したいと思います。tmux現在のウィンドウ以外のすべてのウィンドウを閉じる簡単なコマンドはありますか?

ベストアンサー1

「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.

おすすめ記事