Escaping for send-keys #4002
Radiobiscuit
started this conversation in
General
Replies: 1 comment 1 reply
-
Use quotes? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone,
I've been using tmux to control Liquidsoap as a background process for streaming. For those who are not familiar, Liquidsoap is a scripting system for building audio streams and output control.
I wanted to work out how to control some of the tmux functionality from scripts, and one of these will shut down a Liquidsoap instance from the command line. At this stage, it's the only tmux session running, so using send-keys should do the trick. The only trouble is that it doesn't seem to send the C-m key at the end of the characters that I'm using. This is probably because the characters contain () and ;;
So my question is, how should I write a send-keys argument to make this work:
tmux send-keys shutdown();;C-m
Basically it's the shutdown() command for Liquidsoap followed by the statement delimiter ;; and then the ENTER key. I'm pretty sure I need to escape something, but which bits and how? Any help would be most appreciated as I've spent hours and hours reading up about this, but haven't found a solution yet.
Thanks,
Andy
Beta Was this translation helpful? Give feedback.
All reactions