Thayne McCombs
91e3c3cba5
Replace once_cell with stdlib
...
LazyLock isn't standardized yet, but OnceLock is good enough for what we
need.
2023-06-08 00:05:00 -06:00
Thayne McCombs
39d80a59b6
Remove time from transitive dependencies of chrono
...
Because chrono was depending on an older version of time, and we don't
actually need it with recent versions of chrono.
Relates-To: #1188
Alernative-To: #1190
2022-12-03 01:28:17 -07:00
Thayne McCombs
c159ea2042
Fix panic when using --owner
...
Unfortunately, clap_derive can't combine a value_parser of Option<T>
with an optional argument to get a merged Option<T> so we need to do the
check for the nop outside of the value parser.
Also adds some tests for --owner
Fixes : #1163
2022-11-02 23:26:02 -06:00
Thayne McCombs
c41d61eeda
Merge remote-tracking branch 'upstream/master' into clap-derive
2022-10-09 01:00:48 -06:00
Thayne McCombs
4e7b403c1f
Use clap-derive for option parsing
...
This makes the definition of arguments to fd a little more ergonomic,
and makes it easier to insure the types for the arguments are consitent.
2022-10-08 00:41:33 -06:00
David Peter
9ea882d7cc
Fix clippy suggestions
2022-09-11 21:29:43 +02:00
Shun Sakai
0484486f3f
Remove lazy_static
from dependencies
2021-11-25 20:06:43 +01:00
Jacob Mischka
f32060b0de
Change time comparisons to exclusive
...
Closes #794
2021-11-17 23:38:28 +01:00
Jacob Mischka
ba60a163fe
Use local times for time functions
...
This patch uses Chrono for explicit date or datetime parsing, only using
humantime for its relative time parsing. The following formats are accepted:
1. Full RFC3339 parsing, requiring an explicit timezone
2. `YY-MM-DD`, defaulting to time `00:00:00` for the given date in the
local time zone
3. `YY-MM-DD HH:MM:SS` in the local time zone
Fixes #631 , #794
2021-08-09 13:40:55 +02:00
David Peter
708efaa812
Literal separators
2021-07-27 09:05:23 +02:00
sharkdp
ea48a96945
Run cargo fmt
2020-12-06 12:02:22 +01:00
Platon Pronko
e97a1e90cb
Add exact size support to the --size filter ( #669 )
2020-12-06 11:47:27 +01:00
gorogoroumaru
74c3431a2b
improve time option usage ( #645 )
...
* improve time option usage
2020-09-10 00:34:27 -06:00
Alexandru Macovei
1a16003cca
[ownership][errs] ':' and '' args to --owner result in noop; reject strings with more than one ':'
2020-05-18 21:11:33 +02:00
Alexandru Macovei
09cdf9831d
[ownership] parse leading exclamation mark as negation of ownership component
2020-05-18 21:11:33 +02:00
Alexandru Macovei
22a55361e0
[ownership] change uid/gid storage to tristate enum for negation
2020-05-18 21:11:33 +02:00
Alexandru Macovei
d7cc34e36f
[ownership] depend on users 0.10.0 on unix; parse user and group names
2020-05-18 21:11:33 +02:00
Alexandru Macovei
30cb4adc61
[ownership] initial struct, parsing, and test framework
2020-05-18 21:11:33 +02:00
Alex Kitchens
151eaad043
Fix "unnecessary braces" warning
...
Original warning:
```
warning: unnecessary braces around block return value
--> src/filter/size.rs:5:39
|
5 | static ref SIZE_CAPTURES: Regex = { Regex::new(r"(?i)^([+-])(\d+)(b|[kmgt]i?b?)$").unwrap() };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove these braces
|
= note: `#[warn(unused_braces)]` on by default
warning: 1 warning emitted
```
2020-05-10 21:27:55 +02:00
sharkdp
9f738ad995
Move filter up from internal
2020-04-03 22:36:32 +02:00