6

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?

1 Answer 1

5

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'

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .