Made verbose message of _addto() consistent with other task messages.

In verbose mode, commands first print the updated task, then summarize the change in the following line.
The add/addm/addto commands deviated from this, using "TODO: '<task>' added on line N."
This change splits this into two separate lines, obsoletes the implementation jargon of "line", and makes it easier to visually parse the message.
This is also a preparation for a possible future use of a _list()-like function, so that the updated task is processed and highlighted like the normal task output.
This commit is contained in:
Ingo Karkat
2010-06-04 22:50:09 +08:00
committed by Gina Trapani
parent 821b9d2795
commit 9f03cf6847
8 changed files with 50 additions and 25 deletions

View File

@@ -12,7 +12,8 @@ command work, including support for filtering.
#
test_todo_session 'basic add/list' <<EOF
>>> todo.sh add notice the daisies
TODO: 'notice the daisies' added on line 1.
1: notice the daisies
TODO: 1 added.
>>> todo.sh list
1 notice the daisies
@@ -20,7 +21,8 @@ TODO: 'notice the daisies' added on line 1.
TODO: 1 of 1 tasks shown
>>> todo.sh add smell the roses
TODO: 'smell the roses' added on line 2.
2: smell the roses
TODO: 2 added.
>>> todo.sh list
1 notice the daisies
@@ -46,7 +48,8 @@ EOF
test_todo_session 'case-insensitive filtering' <<EOF
>>> todo.sh add smell the uppercase Roses
TODO: 'smell the uppercase Roses' added on line 3.
3: smell the uppercase Roses
TODO: 3 added.
>>> todo.sh list roses
2 smell the roses
@@ -57,7 +60,8 @@ EOF
test_todo_session 'add with &' <<EOF
>>> todo.sh add "dig the garden & water the flowers"
TODO: 'dig the garden & water the flowers' added on line 4.
4: dig the garden & water the flowers
TODO: 4 added.
>>> todo.sh list
4 dig the garden & water the flowers