aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2023-07-19 17:07:44 -0300
committerSilvio Rhatto <rhatto@riseup.net>2023-07-19 17:07:44 -0300
commitacab74bb53a6754e60d928eaa4558abd90d7ec71 (patch)
tree811c1896b17e3e76083cb764c4497bcc28809226
parent10f57f9fe0e85c3d2361f1d17e8c91a202fcbb0d (diff)
downloadscripts-acab74bb53a6754e60d928eaa4558abd90d7ec71.tar.gz
scripts-acab74bb53a6754e60d928eaa4558abd90d7ec71.tar.bz2
Fix: todo: minor fixes and improvements
-rwxr-xr-xtodo10
1 files changed, 5 insertions, 5 deletions
diff --git a/todo b/todo
index f28dd8c..ba9127f 100755
--- a/todo
+++ b/todo
@@ -28,7 +28,7 @@ function todo_find {
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
@@ -40,7 +40,7 @@ function todo_list {
# 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
@@ -53,7 +53,7 @@ function todo_list {
SILENT="true"
fi
- SILENT=$SILENT tasks $taskstatus list
+ SILENT=$SILENT tasks $taskstatus list 2> /dev/null
echo ""
fi
@@ -79,9 +79,9 @@ function todo_list {
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 ""