fix: export MY_TERM_COLS/LINES before exec sbcl

SBCL strips COLUMNS and LINES from the process environment.
Use non-standard names that SBCL doesn't filter. The values
are captured from stty size before SBCL starts.
This commit is contained in:
2026-05-14 14:55:37 -04:00
parent 4006a62e53
commit d1359eba1d

View File

@@ -406,6 +406,10 @@ case "$COMMAND" in
(sleep 3) (finish-output) (uiop:quit 1)))) (sleep 3) (finish-output) (uiop:quit 1))))
(passepartout.channel-tui:tui-main)) (passepartout.channel-tui:tui-main))
LISPEOF LISPEOF
# Capture terminal dimensions in non-standard env vars
# (SBCL strips COLUMNS/LINES but leaves MY_* alone).
local ts=$(stty size 2>/dev/null)
export MY_TERM_LINES="${ts%% *}" MY_TERM_COLS="${ts##* }"
# Clear stale cl-tty cache to ensure latest backend-size fixes # Clear stale cl-tty cache to ensure latest backend-size fixes
find ~/.cache/common-lisp -name "*.fasl" -path "*cl-tty*" -delete 2>/dev/null find ~/.cache/common-lisp -name "*.fasl" -path "*cl-tty*" -delete 2>/dev/null
exec sbcl --noinform --load /tmp/tui-load.lisp exec sbcl --noinform --load /tmp/tui-load.lisp