From d62ad7350fcda3b4c17d3f19aac3c518baf60541 Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Mon, 25 Mar 2024 23:29:09 +0100 Subject: [PATCH] Fall back to xterm-256color instead --- home/programs/terminal/shell/zsh/rc/fallback_term.zsh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/home/programs/terminal/shell/zsh/rc/fallback_term.zsh b/home/programs/terminal/shell/zsh/rc/fallback_term.zsh index cfd7f43..64e1ee2 100644 --- a/home/programs/terminal/shell/zsh/rc/fallback_term.zsh +++ b/home/programs/terminal/shell/zsh/rc/fallback_term.zsh @@ -1,9 +1,8 @@ # If the set $TERM variable doesn't match any configured terminfo entries # fall back to xterm. This fixes SSH connections from unknown terminals -if [ -z "$TERM" ]; then - export TERM=xterm -elif ! infocmp "$TERM" &>/dev/null; then - export TERM=xterm - echo "TERM set to xterm due to missing terminfo entry." +if ! infocmp "$TERM" &>/dev/null; then + local original="$TERM" + export TERM=xterm-256color + echo "TERM set to $TERM due to missing terminfo entry for $original." fi