]> gitweb.fluxo.info Git - scripts.git/commitdiff
TODO: really exclude folders
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 13 Oct 2016 17:21:07 +0000 (14:21 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 13 Oct 2016 17:21:07 +0000 (14:21 -0300)
todo

diff --git a/todo b/todo
index be217dd36de8f5cfc09330f960ffa4a9fd228c85..bb5338e15d031a82fe39958dbcf3905a9e033c00 100755 (executable)
--- a/todo
+++ b/todo
@@ -22,13 +22,13 @@ FOLDERS="`echo $WORKPATH | tr ':' ' ' | sed -e "s|~|$HOME|g"`"
 # Iterate
 function todo_find {
   for folder in $FOLDERS; do
-    find $folder/ -maxdepth $TODO_MAXDEPTH -iname 'todo*'
+    find $folder/ -maxdepth $TODO_MAXDEPTH -type f -iname 'todo*'
   done
 }
 
 function todo_list {
   todo_find | while read todo; do
-    if [ ! -d "$todo" ] && [ "$todo" != "$NAME" ]; then
+    if [ "$todo" != "$NAME" ]; then
      path="`echo $todo | sed -e "s|^$HOME|~|"`"
      delim="===`echo $path | sed -e 's|.|=|g'`"
      echo ""