Using tmux
to send commands along from one terminal to another, I realize that
$ tmux send -t mySession "text" ENTER
correctly sends text
, but
$ tmux send -t mySession "up" ENTER
sends text
again, probably because up
is interpreted not as text, but as keyworded key up arrow.
Similarly,
$ tmux send -t mySession "3" ENTER
correctly sends 3
, but
$ tmux send -t mySession "-3" ENTER
tmux: unknown option -- 3
usage: send-keys [-lRM] [-t target-pane] key
fails with this error message, and this naive try to escape
$ tmux send -t mySession "\-3" ENTER
sends 3
again, not the expected -3
.
Anyway, I'm pretty sure that I've missed something about the way tmux interprets and understand its argument. What am I missing here?
How do I ensure that mytmuxcommand "<text>" ENTER
will always be interpreted as "send actual <text>
then send ENTER key"?