From: Don Armstrong Date: Fri, 14 Apr 2006 02:10:15 +0000 (+0000) Subject: only run devtodo when it exists X-Git-Url: https://git.donarmstrong.com/?p=home-base.git;a=commitdiff_plain;h=69c506f2c9ec619db23ae86d60f46ecbc238f2fd;hp=ac4c26761874a02eb667c2e17ce13bf4b78ff007 only run devtodo when it exists --- diff --git a/.bashrc b/.bashrc index fc875dd..5f3c7da 100644 --- a/.bashrc +++ b/.bashrc @@ -60,28 +60,29 @@ if [ "$PS1" ]; then 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