tmux: use send-keys -l for literal text input

Without -l, tmux send-keys treats spaces as key-name separators,
so multi-word messages like "This is your time" get split into
individual unrecognized key names instead of being typed as text.
This caused idle nudges to arrive as blank messages.
This commit is contained in:
ProofOfConcept 2026-03-08 18:39:47 -04:00 committed by Kent Overstreet
parent 55fdc3dad7
commit 95baba54c0

View file

@ -51,8 +51,12 @@ pub fn send_prompt(pane: &str, msg: &str) -> bool {
}
thread::sleep(Duration::from_secs(1));
// Type the message
if !send(&[msg]) {
// Type the message (literal mode so spaces aren't key separators)
let ok = Command::new("tmux")
.args(["send-keys", "-t", pane, "-l", msg])
.output()
.is_ok();
if !ok {
return false;
}
thread::sleep(Duration::from_millis(500));