Skip to content

Commit 8dda499

Browse files
authored
Merge pull request #1176 from tmccombs/changed-after
Add --changed-after alias.
2 parents db2590d + 317a0c3 commit 8dda499

File tree

3 files changed

+18
-5
lines changed

3 files changed

+18
-5
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## Features
44

5+
- Added `--changed-after` as alias for `--changed-within`, to have a name consistent with `--changed-before`.
6+
57

68
## Changes
79

doc/fd.1

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -286,12 +286,16 @@ Files with modification times greater than the argument will be returned.
286286
The argument can be provided as a duration (\fI10h, 1d, 35min\fR) or as a specific point
287287
in time in either full RFC3339 format with time zone, or as a date or datetime in the
288288
local time zone (\fIYYYY-MM-DD\fR or \fIYYYY-MM-DD HH:MM:SS\fR).
289-
.B --change-newer-than
290-
can be used as an alias.
289+
\fB\-\-change-newer-than\fR,
290+
.B --newer
291+
or
292+
.B --changed-after
293+
can be used as aliases.
291294

292295
Examples:
293296
\-\-changed-within 2weeks
294297
\-\-change-newer-than "2018-10-27 10:00:00"
298+
\-\-newer 2018-10-27
295299
.TP
296300
.BI "\-\-changed-before " date|duration
297301
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
300304
in time in either full RFC3339 format with time zone, or as a date or datetime in the
301305
local time zone (\fIYYYY-MM-DD\fR or \fIYYYY-MM-DD HH:MM:SS\fR).
302306
.B --change-older-than
303-
can be used as an alias.
307+
or
308+
.B --older
309+
can be used as aliases.
304310

305311
Examples:
306312
\-\-changed-before "2018-10-27 10:00:00"

src/cli.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,8 +335,11 @@ pub struct Opts {
335335
long,
336336
alias("change-newer-than"),
337337
alias("newer"),
338+
alias("changed-after"),
338339
value_name = "date|dur",
339-
long_help = "Filter results based on the file modification time. The argument can be provided \
340+
long_help = "Filter results based on the file modification time. \
341+
Files with modification times greater than the argument are returned. \
342+
The argument can be provided \
340343
as a specific point in time (YYYY-MM-DD HH:MM:SS) or as a duration (10h, 1d, 35min). \
341344
If the time is not specified, it defaults to 00:00:00. \
342345
'--change-newer-than' or '--newer' can be used as aliases.\n\
@@ -353,7 +356,9 @@ pub struct Opts {
353356
alias("change-older-than"),
354357
alias("older"),
355358
value_name = "date|dur",
356-
long_help = "Filter results based on the file modification time. The argument can be provided \
359+
long_help = "Filter results based on the file modification time. \
360+
Files with modification times less than the argument are returned. \
361+
The argument can be provided \
357362
as a specific point in time (YYYY-MM-DD HH:MM:SS) or as a duration (10h, 1d, 35min). \
358363
'--change-older-than' or '--older' can be used as aliases.\n\
359364
Examples:\n \

0 commit comments

Comments
 (0)