power2
power2

Reputation: 999

How do you send keys to a specific window in tmux?

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 "Test2"?

tmux send-keys -t Test.Test2 "STUFF HERE" won't work. That syntax is for panes only.

Upvotes: 24

Views: 15940

Answers (1)

power2
power2

Reputation: 999

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

Upvotes: 59

Related Questions