aboutsummaryrefslogtreecommitdiffstats
path: root/doc/aerc-search.1.scd
diff options
context:
space:
mode:
authorKoni Marti <koni.marti@gmail.com>2022-11-15 21:24:52 +0100
committerRobin Jarry <robin@jarry.cc>2022-12-02 22:59:44 +0100
commitd547dca676553a83c077b34f735c9d2ff5d41dcd (patch)
tree0d65703bc29711eda99a9ed8119304bbcd7958e7 /doc/aerc-search.1.scd
parentce7fbd27ee8f41adfa8e33002ccf965c6a917e5a (diff)
downloadaerc-d547dca676553a83c077b34f735c9d2ff5d41dcd.tar.gz
daterange: support relative terms
Support relative terms when writing date ranges in the search and filter commands with the -d flag. Syntax is inspired by the notmuch search terms. Terms can be written with spaces or underscores for a better readability, so both "this_week" and "this week" are allowed. Terms are not case-sensitive. Some terms can be prefixed with either "this" or "last" where applicable ("this" is assumed by default if omitted): - "today", "yesterday" - ("this"|"last") "year", "month", "week" - all weekdays (e.g. "Tuesday", "last_wed") - all months (e.g. "January", "last_feb") Note that "month" should always be spelled out to prevent a possible ambiguity with "Monday". Weekdays and months do not need to be written out completely, i.e. "February..March" and "Feb..Mar" are both understood. Relative date terms can be used with the <N (year|month|week|day)> syntax where N is a positive integer indicating the number of time units in the past from today. The units can be abbreviated with a single letter, e.g. "1w 1d.." is the same as "1 week 1 day..". More examples: :filter -d yesterday :filter -d last_monday.. :filter -d mon..sat :filter -d 1y1m1w1d.. :search -d this_week "PATCH aerc" Signed-off-by: Koni Marti <koni.marti@gmail.com> Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'doc/aerc-search.1.scd')
-rw-r--r--doc/aerc-search.1.scd19
1 files changed, 19 insertions, 0 deletions
diff --git a/doc/aerc-search.1.scd b/doc/aerc-search.1.scd
index 51e93ade..8349874b 100644
--- a/doc/aerc-search.1.scd
+++ b/doc/aerc-search.1.scd
@@ -44,6 +44,25 @@ aerc-search - search and filter patterns and options for *aerc*(1)
Search for messages within a particular date range defined as
\[start, end) where the dates are in the YYYY-MM-DD format.
+ Relative dates can be used to specify a date range. Spaces and
+ underscores are allowed to improve readability:
+
+ *today*, *yesterday*
+
+ *(this|last) (year|month|week)*
+
+ *Weekdays*, *Monthnames*
+ Can also be abbreviate, so Monday..Tuesday can written
+ as Mon..Tue and February..March as Feb..Mar.
+
+ _<N>_ *(y[ear]|m[onth]|w[eek]|d[ay])*
+ _<N>_ is a positive integer that represents the number
+ of the time units in the past. Mutiple relative terms
+ can will be accumulated. The units can also be
+ abbreviated by a single letter such that yesterday would
+ correspond to _1d_ (equivalent to _1 day_ or _1_day_)
+ and _8 days ago_ would be either _1w1d_ or _8d_.
+
# NOTMUCH
*search* _query_...