Scenario: I edit ~/.zshrc
, and I want to source it in all of my tmux panes, in all windows, in a given session. I want to do this with a keybinding, from any pane.
I tried looking at How to send a command to all panes in tmux?, which used setw synchronize-panes on
and then ran a tmux ex mode command; but I'd like to run source $HOME/.zshrc
, (a shell command), and I'm a little confused as to how to do that.
I'd like it to be a keybinding that I can put into .tmux.conf
, so that I only have to press prefix + <key_combo> to perform this, and then everything returns to the way it was before I ran this (e.g. I don't have to worry about unsetting any tmux options that the command set)