Fall back to xterm-256color instead

This commit is contained in:
ItsDrike 2024-03-25 23:29:09 +01:00
parent 419c916914
commit d62ad7350f
Signed by: ItsDrike
GPG key ID: FA2745890B7048C0

View file

@ -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