2013-03-15 07:37:33 +00:00
|
|
|
#!/bin/zsh
|
2013-03-18 08:27:26 +00:00
|
|
|
if command -v todo >/dev/null; then
|
|
|
|
todo_count() {
|
|
|
|
if [ -n "$2" ]; then
|
|
|
|
file="--database $2"
|
|
|
|
else
|
|
|
|
file="-G"
|
|
|
|
fi
|
|
|
|
todo ${=file} -f +${1:-high} | wc -l
|
|
|
|
}
|
2013-03-22 12:57:30 +00:00
|
|
|
chpwd_hook todo
|
2013-03-18 08:27:26 +00:00
|
|
|
else
|
|
|
|
todo_count() {
|
|
|
|
echo -1
|
|
|
|
}
|
|
|
|
fi
|