From 9af745427e8c6f07b5d42fdb94199c0e2634a4af Mon Sep 17 00:00:00 2001 From: Anton Volnuhin Date: Tue, 3 Mar 2026 02:39:31 +0300 Subject: [PATCH] fall back to xterm-256color when terminfo is missing Replace hardcoded kitty TERM hack with a generic check: if the current TERM's terminfo isn't installed yet, fall back to xterm-256color. The proper terminfo gets installed later in the script. Fixes tput errors when SSHing from Ghostty/kitty into fresh machines. Co-Authored-By: Claude Opus 4.6 --- run_onchange_after_install_main_deps.sh.tmpl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/run_onchange_after_install_main_deps.sh.tmpl b/run_onchange_after_install_main_deps.sh.tmpl index ea4874f..39ea8bc 100644 --- a/run_onchange_after_install_main_deps.sh.tmpl +++ b/run_onchange_after_install_main_deps.sh.tmpl @@ -82,9 +82,10 @@ Yello='\033[0;33m' # Blue Gray='\033[38;5;7m' # Light Gray NC='\033[0m' # No Color -#short-term hack for kitty in early OSes -if [ "$TERM" == "xterm-kitty" ];then -export TERM="xterm-256color" +# Fall back to xterm-256color if the terminal's terminfo isn't installed yet +# (ghostty/kitty terminfo gets installed later in this script) +if ! infocmp "$TERM" >/dev/null 2>&1; then + export TERM="xterm-256color" fi cd