If i have a tmux session called Test, and inside Test i have two windows Test1 and Test2. How do i send a command to say Test2.
tmux send-keys -t Test.Test2 "STUFF HERE" wont work. that syntax is for panes only
Send keys refers to a series of keystrokes that serve as an automated instruction to one of the terminal panes in the tmux window. By using send keys, you can automate certain processes in tmux panes. Send keys work by simulating keystrokes in a terminal.
ctrl + b + % to make a vertical split. ctrl + b + " to make a Horizontal split. ctrl + b + left arrow to move to the left pane. ctrl + b + " to make a Horizontal split.
Ctrl+b, let go of Ctrl, Letf / Right / Up / Down will switch active panes.
By default, Ctrl + b , ! would break the active pane into a new window and switch to it. Where Ctrl + b is the default prefix for tmux.
Unbelievable. I searched everywhere for an answer on the web and I could not find it. Apparently it is just:
tmux send-keys -t Test:Test1 "TEST" C-m
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With