diff --git a/src/bin/poc-daemon/tmux.rs b/src/bin/poc-daemon/tmux.rs index afd5417..f8dacb8 100644 --- a/src/bin/poc-daemon/tmux.rs +++ b/src/bin/poc-daemon/tmux.rs @@ -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));