The simplistic "listall" action implementation just uses _list() on the concatenation of active and done task lists. This has the following shortcomings: - Task numbers shown for archived tasks from done.txt are invalid. - As the number of done tasks likely greatly outnumbers the number of active tasks, the task number padding is often larger than expected (e.g. 0005 instead of 05). - Verbose output lists all tasks as originating from TODO, whereas it should differentiate between TODO: and DONE: sources. The main challenge is to keep processing all tasks through a single pass of _list(), so that there is a single, unified sorting applied to all tasks. A custom AWK script sets all (originally invalid) task numbers from done.txt to "0", meaning "archived task". The verbose message from _list() is replaced with a custom message that shows the tasks from todo.txt, done.txt, and totals. Oh, and added tests for the previously untested "listall" action.
2.1 KiB
Executable File
2.1 KiB
Executable File