5

Reading the tmux man page, I would think that the command to send characters from one pane to the other in a two-pane setup would be the following:

tmux send-keys -t + "ls -l"

But it just sends to the same pane I'm currently in. However, if I do the following:

tmux send-keys -t %1 "ls -l"

where %0 is my current pane and %1 is the "other" pane, then it does work properly.

What am I missing?

4

The + can be used to specify either the “next window” or the “next pane”. A bare + is always interpreted as “next window” due to the way the parsing is done.

To force the “next pane” interpretation use .+ (FULL STOP followed by PLUS SIGN):

tmux send-keys -t .+ 'ls -l'
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.