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:
parent
346f509784
commit
9e8334698c
|
@ -50,11 +50,8 @@ cd(){
|
||||||
if [ -e ".zin" ]; then
|
if [ -e ".zin" ]; then
|
||||||
. ".zin"
|
. ".zin"
|
||||||
fi
|
fi
|
||||||
todo
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#}}}
|
#}}}
|
||||||
|
|
||||||
#################################################################################
|
#################################################################################
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue