]> gitweb.fluxo.info Git - scripts.git/commitdiff
TODO: Ignore lists without tasks
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 20 Oct 2016 12:11:50 +0000 (10:11 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 20 Oct 2016 12:11:50 +0000 (10:11 -0200)
todo

diff --git a/todo b/todo
index 7f2a4e42195f0c9f5c12accf4fdbeaec1f2feecf..1671485851b957ee3d723defed8122f5ce846a4f 100755 (executable)
--- a/todo
+++ b/todo
@@ -22,7 +22,12 @@ FOLDERS="`echo $WORKPATH | tr ':' ' ' | sed -e "s|~|$HOME|g"`"
 # Iterate
 function todo_find {
   for folder in $FOLDERS; do
-    find $folder/ -maxdepth $TODO_MAXDEPTH -xtype f -iname 'todo*'
+    find $folder/ -maxdepth $TODO_MAXDEPTH -xtype f -iname 'todo*' | while read todo; do
+      # Ignore lists without tasks
+      if grep -q -e '*' -e '-' $todo; then
+        echo $todo
+      fi
+    done
   done
 }