From 0df373f26a07b70b2705994fc19b76981d09deef Mon Sep 17 00:00:00 2001 From: Lars Henriksen Date: Fri, 11 Aug 2017 09:23:13 +0200 Subject: Check for optional argument to -s option Signed-off-by: Lars Henriksen 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 bcfd207..a860ed9 100644 --- a/src/args.c +++ b/src/args.c @@ -522,6 +522,8 @@ int parse_args(int argc, char **argv) query = 1; break; case 's': + if (!optarg) + optarg = "today"; from = parse_datetimearg(optarg); EXIT_IF(from == -1, _("invalid date: %s"), optarg); filter.type_mask |= TYPE_MASK_CAL; -- cgit v1.2.3-70-g09d2