title: How to send a command to all panes in tmux?
body: <p>I like to call <code>:clear-history</code> 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.</p>
  
  <p>I know how to send a command to all the windows, courtesy of this <a href="https://stackoverflow.com/questions/9250884/send-command-to-all-window-in-tmux">question</a>, but how do I send a command to all the panes of which window as well?</p>
  
  <p><code>send-keys</code> and <code>synchronize-panes</code> from the tmux manpage come to mind, but I'm not sure how to marry them together. But maybe there is a simpler way to do this.</p>
  
  <h3>Extra Observations:</h3>
  
  <p>Thinking about this a little bit, <code>tmux list-panes -a</code> seems to list all the panes in the current session. Pretty useful to start off with. Where do I go from here?</p>