From 03c4465baf3b348de3afc5fd873d417ae4887def Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Thu, 28 Jan 2016 18:34:42 +0100 Subject: 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 --- src/args.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/args.c b/src/args.c index 6a85885..a82fcac 100644 --- a/src/args.c +++ b/src/args.c @@ -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 { -- cgit v1.2.3-54-g00ecf