From 0b641da598843bb64533d8ab0aea46f4db59810b Mon Sep 17 00:00:00 2001 From: Thomas Lauf Date: Fri, 6 Oct 2023 08:30:05 +0200 Subject: [PATCH] Add ":today" hint Signed-off-by: Thomas Lauf --- ChangeLog | 4 +++- doc/man7/timew-hints.7.adoc | 2 +- src/helper.cpp | 1 + src/init.cpp | 1 + 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 36caf74d..d720ae42 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,6 @@ ------- current release --------------------------- +- Add ':today' hint + + ------ current release --------------------------- 1.6.0 (2023-09-18) - cd1aa610ed50558bb2cf141022fa7b41523091ac3ae5fbb9c2d459cfe1afc782 diff --git a/doc/man7/timew-hints.7.adoc b/doc/man7/timew-hints.7.adoc index 69155e91..1610663f 100644 --- a/doc/man7/timew-hints.7.adoc +++ b/doc/man7/timew-hints.7.adoc @@ -36,7 +36,7 @@ Range hints provide convenient shortcuts to date ranges: :all All tracked time :yesterday The 24 hours of the previous day - :day The 24 hours of the current day + :day / :today The 24 hours of the current day :week This week :fortnight This week and the one before :month This month diff --git a/src/helper.cpp b/src/helper.cpp index 1c164ad0..132887fb 100644 --- a/src/helper.cpp +++ b/src/helper.cpp @@ -147,6 +147,7 @@ bool expandIntervalHint ( { {":yesterday", {"sopd", "sod" }}, {":day", {"sod", "sond"}}, + {":today", {"sod", "sond"}}, {":week", {"sow", "sonw"}}, {":fortnight", {"sopw", "sonw"}}, {":month", {"som", "sonm"}}, diff --git a/src/init.cpp b/src/init.cpp index 5d5107bc..2d2fa6db 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -112,6 +112,7 @@ void initializeEntities (CLI& cli) cli.entity ("hint", ":quiet"); cli.entity ("hint", ":tags"); cli.entity ("hint", ":no-tags"); + cli.entity ("hint", ":today"); cli.entity ("hint", ":week"); cli.entity ("hint", ":year"); cli.entity ("hint", ":yes");