Add 'tmux/input_sync'
This commit is contained in:
15
tmux/input_sync
Normal file
15
tmux/input_sync
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
# Example of a function you could place in .bashrc (or similar) showing synchronised input to multiple panes in tmux.
|
||||||
|
|
||||||
|
function multi_ssh
|
||||||
|
{
|
||||||
|
tmux new-session \; \
|
||||||
|
split-window -h \; \
|
||||||
|
select-pane -t 0 \; \
|
||||||
|
send-keys 'ssh user1@server1' C-m \; \
|
||||||
|
select-pane -t 1 \; \
|
||||||
|
send-keys 'ssh user2@server2' C-m \; \
|
||||||
|
setw synchronize-panes \;
|
||||||
|
}
|
||||||
|
|
||||||
|
# This will give two panes, each one ssh'd into a different server (we've assumed keys setup for auth), and with anything
|
||||||
|
# you now type being entered into BOTH panes simultaneously.
|
||||||
Reference in New Issue
Block a user