diff --git a/passepartout b/passepartout index 0d2a8a6..d0fb31d 100755 --- a/passepartout +++ b/passepartout @@ -384,15 +384,15 @@ case "$COMMAND" in fi # Restore terminal on any exit (set -e can kill the script before the # explicit stty restore below if sbcl exits non-zero). - cleanup() { stty icanon echo ixon 2>/dev/null; } + cleanup() { stty icanon echo ixon 2>/dev/null || true; } trap cleanup EXIT # Capture terminal dimensions in non-standard env vars # (SBCL strips COLUMNS/LINES but leaves MY_* alone). - ts=$(stty size 2>/dev/null) + ts=$(stty size 2>/dev/null) || true 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 -ixon 2>/dev/null + stty -icanon -echo -ixon 2>/dev/null || true # Ensure COLORTERM is set for modern backend detection export COLORTERM="${COLORTERM:-truecolor}" # Clear stale cache