Align report order with other actions.

Like "add" or "do", first the object, then (in verbose mode) the status message is printed.
This commit is contained in:
Ingo Karkat
2012-01-14 15:10:22 +01:00
parent 45e9dc7550
commit 20b7ef6964
2 changed files with 4 additions and 4 deletions

View File

@@ -85,8 +85,8 @@ TODO: $HOME/todo.txt archived.
TODO: 5 of 5 tasks shown
>>> todo.sh report
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"
@@ -162,12 +162,12 @@ TODO: 6 of 6 tasks shown
TODO: 3 marked as done.
>>> todo.sh report
TODO: Report file updated.
2009-02-13T04:40:00 5 2
TODO: Report file updated.
>>> todo.sh report
TODO: Report file updated.
2009-02-13T04:40:00 5 2
TODO: Report file updated.
>>> todo.sh remdup
Usage: todo.sh [-fhpantvV] [-d todo_config] action [task_number] [task_description]

View File

@@ -1194,8 +1194,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."
;;
* )