]> git.donarmstrong.com Git - home-base.git/commitdiff
* Handle older versions of toe
authorDon Armstrong <don@donarmstrong.com>
Fri, 28 Sep 2007 19:13:11 +0000 (19:13 +0000)
committerDon Armstrong <don@donarmstrong.com>
Fri, 28 Sep 2007 19:13:11 +0000 (19:13 +0000)
.bashrc

diff --git a/.bashrc b/.bashrc
index 99e079c86000d2a7236cc1cd7be2822d862ee87b..189377b4025a45c57a279a772cd022cae57aadad 100644 (file)
--- a/.bashrc
+++ b/.bashrc
@@ -36,7 +36,11 @@ if [ "$PS1" ]; then
     # \[\033[1;36m\][\w]\n\[\033[0;36m\][\h|\t]$ \[\033[0m\]
 
     # make sure the term we're using exists in the termcap
-    if ! toe -a|grep -q "^$TERM        "; then
+    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*)