]> git.donarmstrong.com Git - home-base.git/blobdiff - .bashrc
* Handle older versions of toe
[home-base.git] / .bashrc
diff --git a/.bashrc b/.bashrc
index 8622e18c02ab267a002454a80acd150796a8b1cb..189377b4025a45c57a279a772cd022cae57aadad 100644 (file)
--- a/.bashrc
+++ b/.bashrc
@@ -28,11 +28,32 @@ if [ "$PS1" ]; then
     alias gr='gimp-remote-2.2'
     alias emc='sane_editor'
 
+    alias svn-b="svn-buildpackage --svn-builder 'pdebuild --buildresult ..' --svn-ignore-new"
+
     # set a fancy prompt
     #printf '\33]2;%s\007'
     PS1="\[\033[0;36m\]\h \t \w$\[\033[0m\] "
     # \[\033[1;36m\][\w]\n\[\033[0;36m\][\h|\t]$ \[\033[0m\]
 
+    # make sure the term we're using exists in the termcap
+    TOEOPT='-a'
+    if ! toe $TOEOPT >/dev/null 2>&1; then
+       TOEOPT=''
+    fi;
+    if ! toe $TOEOPT|grep -q "^$TERM   "; then
+       # if it doesn't, try to switch
+       case $TERM in
+           rxvt*)
+               TERM="rxvt"
+               ;;
+           xterm*)
+               TERM="xterm"
+               ;;
+           *)
+               ;;
+       esac
+       export TERM;
+    fi;
     # If this is an xterm set the title to user@host:dir
     case $TERM in
        screen|xterm*)