Fix behavior of --todo with an optional argument
The previous behavior of --todo was to always only list uncompleted items, unless zero was specified as additional argument. Restore and document this behavior. Also, fix two tests that failed because the --todo output is now sorted. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
This commit is contained in:
@@ -534,6 +534,8 @@ int parse_args(int argc, char **argv)
|
||||
filter.priority = atoi(optarg);
|
||||
if (filter.priority == 0)
|
||||
filter.completed = 1;
|
||||
else
|
||||
filter.uncompleted = 1;
|
||||
EXIT_IF(filter.priority > 9,
|
||||
_("invalid priority: %s"), optarg);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user