aboutsummaryrefslogtreecommitdiff
path: root/todo
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2018-05-23 08:11:58 -0300
committerSilvio Rhatto <rhatto@riseup.net>2018-05-23 08:11:58 -0300
commitac48b0fa468c47ff5ac878191f2de37a9b76a49e (patch)
treea1ebc4fdf055cf8fe5661f0ddf58fa3ec3e45f35 /todo
parent03d3b1cc6f45049efc063dc7cfda35567c168713 (diff)
downloadscripts-ac48b0fa468c47ff5ac878191f2de37a9b76a49e.tar.gz
scripts-ac48b0fa468c47ff5ac878191f2de37a9b76a49e.tar.bz2
De-uglify a bit todo and status outputs
Diffstat (limited to 'todo')
-rwxr-xr-xtodo23
1 files changed, 14 insertions, 9 deletions
diff --git a/todo b/todo
index 19eeb24..a774528 100755
--- a/todo
+++ b/todo
@@ -40,21 +40,26 @@ function todo_list {
# User's Taskwarrior
if which task &> /dev/null; then
- echo "taskwarrior:"
- echo ""
- task list 2> /dev/null
- echo ""
+ if [ "`task status:pending count`" != "0" ]; then
+ echo "taskwarrior:"
+ #echo ""
+ task list 2> /dev/null
+ echo ""
+ fi
fi
+ # Taskwarrior data from projects
+ SILENT=true tasks +$status list
+ echo ""
+
# User's Timewarrior
if which timew &> /dev/null; then
- timew | grep -v "^There is no active time tracking."
- echo ""
+ if ! timew | grep -q "^There is no active time tracking."; then
+ timew
+ echo ""
+ fi
fi
- # Timewarrior data from projects
- SILENT=true tasks +$status list
-
todo_find | while read todo; do
if [ "$todo" != "$NAME" ]; then
if [ ! -z "$status" ] && ! grep -q "\($status\)" $todo; then