From d46adadb1d1336f50e7cac6a28c64d735fcdd2fe Mon Sep 17 00:00:00 2001 From: Ingo Karkat Date: Sat, 14 Jan 2012 15:10:22 +0100 Subject: [PATCH] Align report order with other actions. Like "add" or "do", first the object, then (in verbose mode) the status message is printed. --- tests/t9999-testsuite_example.sh | 22 +--------------------- todo.sh | 2 +- 2 files changed, 2 insertions(+), 22 deletions(-) diff --git a/tests/t9999-testsuite_example.sh b/tests/t9999-testsuite_example.sh index 7ca889e..0c7efbe 100755 --- a/tests/t9999-testsuite_example.sh +++ b/tests/t9999-testsuite_example.sh @@ -86,13 +86,8 @@ TODO: 5 of 5 tasks shown >>> todo.sh report TODO: $HOME/todo.txt archived. -TODO: Report file updated. -2009-02-13-04:40:00 5 1 - ->>> todo.sh report -TODO: $HOME/todo.txt archived. -TODO: Report file updated. 2009-02-13T04:40:00 5 1 +TODO: Report file updated. >>> todo.sh append g a usage: todo.sh append ITEM# "TEXT TO APPEND" @@ -163,21 +158,6 @@ TODO: 6 of 6 tasks shown -- TODO: 6 of 6 tasks shown ->>> todo.sh -a do 3 -3 x 2009-02-13 smell the coffee +wakeup -TODO: 3 marked as done. - ->>> todo.sh report -x 2009-02-13 smell the coffee +wakeup -TODO: $HOME/todo.txt archived. -TODO: Report file updated. -2009-02-13T04:40:00 5 2 - ->>> todo.sh report -TODO: $HOME/todo.txt archived. -TODO: Report file updated. -2009-02-13T04:40:00 5 2 - >>> todo.sh remdup Usage: todo.sh [-fhpantvV] [-d todo_config] action [task_number] [task_description] Try 'todo.sh -h' for more information. diff --git a/todo.sh b/todo.sh index a37be5c..6c34003 100755 --- a/todo.sh +++ b/todo.sh @@ -1223,8 +1223,8 @@ note: PRIORITY must be anywhere from A to Z." TOTAL=$( sed -n '$ =' "$TODO_FILE" ) TDONE=$( sed -n '$ =' "$DONE_FILE" ) echo "$(date +%Y-%m-%dT%T) ${TOTAL:-0} ${TDONE:-0}" >> "$REPORT_FILE" - [ $TODOTXT_VERBOSE -gt 0 ] && echo "TODO: Report file updated." sed -ne '$p' "$REPORT_FILE" + [ $TODOTXT_VERBOSE -gt 0 ] && echo "TODO: Report file updated." ;; "deduplicate" )