]> gitweb.fluxo.info Git - scripts.git/commitdiff
Taskwarrior and timewarrior support at todo script
authorSilvio Rhatto <rhatto@riseup.net>
Mon, 21 May 2018 23:14:55 +0000 (20:14 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Mon, 21 May 2018 23:14:55 +0000 (20:14 -0300)
todo

diff --git a/todo b/todo
index 568809b35f5ce8a820492ee5dad33c4f7e27def8..42aaf1981726960940f88f9f9a8f957fa009b61b 100755 (executable)
--- a/todo
+++ b/todo
@@ -38,6 +38,20 @@ function todo_find {
 function todo_list {
   local status="$1"
 
+  # Taskwarrior
+  if which task &> /dev/null; then
+    echo "taskwarrior:"
+    echo ""
+    task list 2> /dev/null
+    echo ""
+  fi
+
+  # Timewarrior
+  if which timew &> /dev/null; then
+    timew | grep -v "^There is no active time tracking."
+    echo ""
+  fi
+
   todo_find | while read todo; do
     if [ "$todo" != "$NAME" ]; then
       if [ ! -z "$status" ] && ! grep -q "\($status\)" $todo; then