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?
Best Answer
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):