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.
You can combine synchronize-panes
and send-keys
in a single shortcut to send commands to all the panes:
Predefined tmux command clear-history
:
bind-key C set-option -w synchronize-panes on\; clear-history \; set-option -w synchronize-panes off
Prompt an arbitrary tmux command:
bind-key p command-prompt -p "Panes command: " "set-option -w synchronize-panes on; %% ; set-option -w -u synchronize-panes"
Prompt an arbitrary shell command:
bind-key p command-prompt -p "Panes command: " "set-option -w synchronize-panes on; send-keys %%\\n ; set-option -w -u synchronize-panes"