How to send a command to all panes in tmux?

后端 未结 8 1014
夕颜
夕颜 2021-01-29 17:13

I like to call :clear-history on panes with a huge scrollback. However, I want to script a way to send this command to all the panes in the various windows.

8条回答
  •  温柔的废话
    2021-01-29 17:46

    Update June 2019

    Quick illustration on how to configure your own binding for synchronize panes.

    Added the following into my tmux.conf (the comments certainly apply to my overall configuration):

    # synchronize all panes in a window
    # don't use control S, too easily confused
    # with navigation key sequences in tmux (show sessions)
    unbind C-S
    bind C-Y set-window-option synchronize-panes
    

    Now, I can toggle the ability to synchronize commands across multiple panes with .

    (Yes, I remapped the bind key to Ctrl a).

提交回复
热议问题