summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Henriksen <LarsHenriksen@get2net.dk>2017-08-11 09:23:13 +0200
committerLukas Fleischer <lfleischer@calcurse.org>2017-08-12 15:38:24 +0200
commit0df373f26a07b70b2705994fc19b76981d09deef (patch)
treecf7e5b304eae8ef2c3d149b9a0ad55588328cbc5
parent43cd40e8cec82bf66a24772ae27502f2c5b93577 (diff)
downloadcalcurse-0df373f26a07b70b2705994fc19b76981d09deef.tar.gz
calcurse-0df373f26a07b70b2705994fc19b76981d09deef.zip
Check for optional argument to -s option
Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
-rw-r--r--src/args.c2
1 files changed, 2 insertions, 0 deletions
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;