zsh/modules/todo/init

17 lines
231 B
Plaintext
Raw Normal View History

#!/bin/zsh
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
}
chpwd_hook todo
else
todo_count() {
echo -1
}
fi