summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Peter <sharkdp@users.noreply.github.com>2022-11-21 08:36:43 +0100
committerGitHub <noreply@github.com>2022-11-21 08:36:43 +0100
commit8dda4998304e4fef04bc0119aa7114d47969129a (patch)
tree8e41a3ca4cde47d69e4bbf7591fd68ca86eb954a
parentdb2590dca56a180d51ec73a3dc41963e454452cc (diff)
parent317a0c3cd3c980dad817ff68de0075b03f340679 (diff)
Merge pull request #1176 from tmccombs/changed-afterv8.5.3
Add --changed-after alias.
-rw-r--r--CHANGELOG.md2
-rw-r--r--doc/fd.112
-rw-r--r--src/cli.rs9
3 files changed, 18 insertions, 5 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d8be66e..713f6b6 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,8 @@
## Features
+- Added `--changed-after` as alias for `--changed-within`, to have a name consistent with `--changed-before`.
+
## Changes
diff --git a/doc/fd.1 b/doc/fd.1
index 6616ee9..1f9b2fb 100644
--- a/doc/fd.1
+++ b/doc/fd.1
@@ -286,12 +286,16 @@ Files with modification times greater than the argument will be returned.
The argument can be provided as a duration (\fI10h, 1d, 35min\fR) or as a specific point
in time in either full RFC3339 format with time zone, or as a date or datetime in the
local time zone (\fIYYYY-MM-DD\fR or \fIYYYY-MM-DD HH:MM:SS\fR).
-.B --change-newer-than
-can be used as an alias.
+\fB\-\-change-newer-than\fR,
+.B --newer
+or
+.B --changed-after
+can be used as aliases.
Examples:
\-\-changed-within 2weeks
\-\-change-newer-than "2018-10-27 10:00:00"
+ \-\-newer 2018-10-27
.TP
.BI "\-\-changed-before " date|duration
Filter results based on the file modification time.
@@ -300,7 +304,9 @@ The argument can be provided as a duration (\fI10h, 1d, 35min\fR) or as a specif
in time in either full RFC3339 format with time zone, or as a date or datetime in the
local time zone (\fIYYYY-MM-DD\fR or \fIYYYY-MM-DD HH:MM:SS\fR).
.B --change-older-than
-can be used as an alias.
+or
+.B --older
+can be used as aliases.
Examples:
\-\-changed-before "2018-10-27 10:00:00"
diff --git a/src/cli.rs b/src/cli.rs
index e6a9743..36c75ad 100644
--- a/src/cli.rs
+++ b/src/cli.rs
@@ -335,8 +335,11 @@ pub struct Opts {
long,
alias("change-newer-than"),
alias("newer"),
+ alias("changed-after"),
value_name = "date|dur",
- long_help = "Filter results based on the file modification time. The argument can be provided \
+ long_help = "Filter results based on the file modification time. \
+ Files with modification times greater than the argument are returned. \
+ The argument can be provided \
as a specific point in time (YYYY-MM-DD HH:MM:SS) or as a duration (10h, 1d, 35min). \
If the time is not specified, it defaults to 00:00:00. \
'--change-newer-than' or '--newer' can be used as aliases.\n\
@@ -353,7 +356,9 @@ pub struct Opts {
alias("change-older-than"),
alias("older"),
value_name = "date|dur",
- long_help = "Filter results based on the file modification time. The argument can be provided \
+ long_help = "Filter results based on the file modification time. \
+ Files with modification times less than the argument are returned. \
+ The argument can be provided \
as a specific point in time (YYYY-MM-DD HH:MM:SS) or as a duration (10h, 1d, 35min). \
'--change-older-than' or '--older' can be used as aliases.\n\
Examples:\n \