# Let's pick the most capable xterm variant we can find. case "$TERM" in xterm*) for term in xterm-256color xterm-16color xterm-color xterm; do test -f /usr/share/terminfo/x/$term && export TERM=$term && break done ;; esac