diff --git a/src/components/input.lisp b/src/components/input.lisp index 48af8eb..b25d54e 100644 --- a/src/components/input.lisp +++ b/src/components/input.lisp @@ -45,10 +45,12 @@ ;;; Terminal raw mode (stty on /dev/tty — portable across Unices) ;;; --------------------------------------------------------------------------- (defun stty-run (args) - "Run stty with ARGS on the controlling terminal. Returns stdout as string." + "Run stty with ARGS. Returns stdout as string." (with-output-to-string (s) - (sb-ext:run-program "stty" (append '("-F" "/dev/tty") args) - :output s :input :stdin :wait t))) + (sb-ext:run-program "/bin/sh" + (list "-c" (format nil "stty ~{~a~^ ~} < /dev/tty" + (mapcar #'princ-to-string args))) + :output s :wait t))) (defun save-terminal-state () "Save current terminal settings via stty -g. Returns a string."