]> code.delx.au - dotfiles/commitdiff
If TERM is unknown to terminfo then use TERM=xterm instead.
authorJames Bunton <jamesbunton@delx.net.au>
Tue, 3 Jun 2008 07:04:21 +0000 (17:04 +1000)
committerJames Bunton <jamesbunton@delx.net.au>
Tue, 3 Jun 2008 07:04:21 +0000 (17:04 +1000)
.bash/interactive

index 5bd9ef17aad31eae4a54e3232c7fa9eb50532a34..efcb1b9952966db0a398f5eb143e887f65b26414 100644 (file)
@@ -15,6 +15,12 @@ fi
 # Prompt: user@host:directory$
 PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\n\$ '
 
+# Check for unsupported TERM variable
+if ! tput init &> /dev/null; then
+       echo "Warning\! TERM=$TERM unsupported, using TERM=xterm"
+       export TERM=xterm
+fi
+
 # The all important colours!
 ssource "${HOME}/.bash/colors"