nixdots/home/programs/terminal/shell/zsh/rc/fallback_term.zsh
2024-03-25 23:22:26 +01:00

10 lines
313 B
Bash

# 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."
fi