]> gitweb.fluxo.info Git - scripts.git/commitdiff
Updates todo interface
authorSilvio Rhatto <rhatto@riseup.net>
Fri, 14 Oct 2016 02:01:29 +0000 (23:01 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Fri, 14 Oct 2016 02:01:29 +0000 (23:01 -0300)
todo

diff --git a/todo b/todo
index 89e0771e65c31e245ad618dac2287f8c398c3fed..9a92d6e17ec840af53fbef63c9f10c3ff4dcf35c 100755 (executable)
--- a/todo
+++ b/todo
@@ -32,19 +32,18 @@ function todo_list {
      path="`echo $todo | sed -e "s|^$HOME|~|"`"
      delim="===`echo $path | sed -e 's|.|=|g'`"
      echo ""
-     echo $delim
      echo In $path
      echo $delim
      echo ""
-     cat $todo
+     grep -e '*' -e '-' $todo
     fi
   done
 }
 
 if [ "$OPTION" == "list" ]; then
-  todo_list | less
+  todo_find | grep -v -e "^$NAME$" | sed -e "s|^$HOME|~|"
 elif [ "$OPTION" == "count" ]; then
-  todo_find | wc -l
+  todo_find | grep -v $NAME | wc -l
 else
-  todo_find | grep -v -e "^$NAME$" | sed -e "s|^$HOME|~|"
+  todo_list | less
 fi