find $folder/ -maxdepth $TODO_MAXDEPTH -xtype f -iname 'todo*' | while read todo; do
# Ignore lists without tasks
- if grep -q -e '*' -e '-' $todo; then
+ if grep -q -e '* [ ]' -e '-' $todo; then
echo $todo
fi
done
# User's Taskwarrior
if which task &> /dev/null; then
- if [ "`task status:pending count`" != "0" ]; then
+ if [ "`task status:pending count 2> /dev/null`" != "0" ]; then
echo "taskwarrior:"
#echo ""
task list 2> /dev/null
SILENT="true"
fi
- SILENT=$SILENT tasks $taskstatus list
+ SILENT=$SILENT tasks $taskstatus list 2> /dev/null
echo ""
fi
echo ""
if [ ! -z "$status" ]; then
- grep -e '*' -e '-' $todo | grep "\($status\)"
+ grep -e '* [ ]' -e '-' $todo | grep "\($status\)"
else
- grep -e '*' -e '-' $todo
+ grep -e '* [ ]' -e '-' $todo
fi
echo ""