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

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