Skip to content

Instantly share code, notes, and snippets.

@stesh
Created June 19, 2012 10:49
Show Gist options
  • Save stesh/2953505 to your computer and use it in GitHub Desktop.
Save stesh/2953505 to your computer and use it in GitHub Desktop.
source .zshrc in every pane of every window of every session on the tmux server
update_all_shells () {
for session in $(tmux list-sessions|cut -d ':' -f 1); do
for window in $(tmux list-windows -t $session | cut -d ':' -f 1); do
tmux set-window-option -t $session:$window synchronize-panes on
tmux send-keys -t $session:$window 'source ~/.zshrc'
tmux send-keys -t $session:$window 'ENTER'
tmux set-window-option -t $session:$window synchronize-panes off
done
done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment