fix: set stty -icanon -echo in bash script before exec sbcl
uiop:run-program inside SBCL can't access the terminal, so stty calls from within Lisp fail silently. By running 'stty -icanon -echo' in the bash script before exec sbcl, the terminal is already in character-at-a-time mode when the TUI starts, and Ctrl+P/B keys arrive as individual bytes through the cat pipe.
This commit is contained in:
@@ -410,6 +410,9 @@ LISPEOF
|
||||
# (SBCL strips COLUMNS/LINES but leaves MY_* alone).
|
||||
ts=$(stty size 2>/dev/null)
|
||||
export MY_TERM_ROWS="${ts%% *}" MY_TERM_COLS="${ts##* }"
|
||||
# Set character-at-a-time mode BEFORE SBCL starts
|
||||
# (uiop:run-program inside SBCL can't access the terminal)
|
||||
stty -icanon -echo 2>/dev/null
|
||||
# Clear stale cl-tty cache to ensure latest backend-size fixes
|
||||
find ~/.cache/common-lisp -name "*.fasl" -path "*cl-tty*" -delete 2>/dev/null
|
||||
exec sbcl --noinform --load /tmp/tui-load.lisp
|
||||
|
||||
Reference in New Issue
Block a user