Use die() / print to stderr for error conditions

To indicate that something went wrong (e.g. the task already was unprioritized).
Note: For actions that handle multiple ITEMs in a loop, we cannot use die() as that would abort processing of any following ITEM(s). Instead, use a status variable and set it to 1 on error, then exit at the end.
This commit is contained in:
Ingo Karkat
2023-01-21 19:01:24 +01:00
parent 803881998f
commit ef419f3594
7 changed files with 26 additions and 10 deletions

View File

@@ -90,6 +90,7 @@ TODO: 2 re-prioritized from (C) to (A).
TODO: 3 of 3 tasks shown
>>> todo.sh pri 2 a
=== 1
2 (A) notice the sunflowers
TODO: 2 already prioritized (A).