pri: Check for existing priority and adapt message.

The existing check (as with depri) didn't do much good. Instead, fetch the existing priority and use that information to print more specific messages:
- TODO: 42 re-prioritized from (C) to (A)
- TODO: 42 already prioritized (A)
This commit is contained in:
Ingo Karkat
2011-05-10 12:44:34 +02:00
parent 5605c4b1b9
commit e6136e14b8
2 changed files with 18 additions and 13 deletions

View File

@@ -74,7 +74,7 @@ EOF
test_todo_session 'reprioritize' <<EOF
>>> todo.sh pri 2 A
2 (A) notice the sunflowers
TODO: 2 prioritized (A).
TODO: 2 re-prioritized from (C) to (A).
>>> todo.sh -p list
2 (A) notice the sunflowers
@@ -85,7 +85,7 @@ TODO: 3 of 3 tasks shown
>>> todo.sh pri 2 a
2 (A) notice the sunflowers
TODO: 2 prioritized (A).
TODO: 2 already prioritized (A).
>>> todo.sh -p listpri
2 (A) notice the sunflowers