]> git.donarmstrong.com Git - home-base.git/commitdiff
only run devtodo when it exists
authorDon Armstrong <don@donarmstrong.com>
Fri, 14 Apr 2006 02:10:15 +0000 (02:10 +0000)
committerDon Armstrong <don@donarmstrong.com>
Fri, 14 Apr 2006 02:10:15 +0000 (02:10 +0000)
.bashrc

diff --git a/.bashrc b/.bashrc
index fc875dd4279c88c4aebd5c551d5e8e07b33c2085..5f3c7da67c5be696fc47a675dc6d09088f57e310 100644 (file)
--- a/.bashrc
+++ b/.bashrc
@@ -60,28 +60,29 @@ if [ "$PS1" ]; then
     fi;
     export TMPDIR="$(echo ~/tmp)";
 
     fi;
     export TMPDIR="$(echo ~/tmp)";
 
-    for a in tda tdd tde; do
-       alias "s${a}"="STODO_NO_COMMIT=1 $a"
-    done;
+    if [ -n "$(which devtodo)" ]; then
+       for a in tda tdd tde; do
+           alias "s${a}"="STODO_NO_COMMIT=1 $a"
+       done;
 
 
-    TODO_OPTIONS="--timeout --summary"
+       TODO_OPTIONS="--timeout --summary"
 
 
-    cd ()
-    {
-        builtin cd "$@" && [ -r .todo ] && devtodo ${TODO_OPTIONS}
-    }
-
-    pushd ()
-    {
-        builtin pushd "$@" && [ -r .todo ] && devtodo ${TODO_OPTIONS}
-    }
-    
-    popd ()
-    {
-        builtin popd "$@" && [ -r .todo ] && devtodo ${TODO_OPTIONS}
-    }              
-    
-    # Run todo initially upon login
-    devtodo ${TODO_OPTIONS}
+       cd ()
+       {
+            builtin cd "$@" && [ -r .todo ] && devtodo ${TODO_OPTIONS}
+       }
 
 
+       pushd ()
+       {
+            builtin pushd "$@" && [ -r .todo ] && devtodo ${TODO_OPTIONS}
+       }
+       
+       popd ()
+       {
+            builtin popd "$@" && [ -r .todo ] && devtodo ${TODO_OPTIONS}
+       }              
+       
+        # Run todo initially upon login
+       devtodo ${TODO_OPTIONS}
+    fi;
 fi
 fi