make the todo call in cd() a hook added conditionally.

This way no error is thrown, when the todo program is missing.
This commit is contained in:
Alexander Gehrke (crater2150) 2013-03-22 13:57:30 +01:00
parent 346f509784
commit 9e8334698c
2 changed files with 1 additions and 3 deletions

View file

@ -50,11 +50,8 @@ cd(){
if [ -e ".zin" ]; then if [ -e ".zin" ]; then
. ".zin" . ".zin"
fi fi
todo
} }
#}}} #}}}
################################################################################# #################################################################################

View file

@ -8,6 +8,7 @@ if command -v todo >/dev/null; then
fi fi
todo ${=file} -f +${1:-high} | wc -l todo ${=file} -f +${1:-high} | wc -l
} }
chpwd_hook todo
else else
todo_count() { todo_count() {
echo -1 echo -1