Commit graph

168 commits

Author SHA1 Message Date
Thayne McCombs
a36f2cf61c Skip an executable test if running as root
Fixes #1214
2022-12-28 23:28:41 -07:00
Thayne McCombs
7ec795cd57 Change full-path tests to work on windows as well 2022-12-03 22:30:32 -07:00
Thayne McCombs
0a575763a1 Change full path tests to be more resilient
Use patterns that won't conflict with randomly generated portion of
temporary directory

Fixes: #1181
2022-12-01 22:02:19 -07:00
Thayne McCombs
650a511fa4 Use tempfile instead of tempdir
Because tempdir is no longer maintained, because it has been combined
with the tempfile crate.

Relates-To: #1188
2022-11-30 02:26:16 -07:00
Ptipiak
cd5fad3cf3 Adding a simple test for executable files 2022-11-26 10:09:40 +01:00
Kasper Gałkowski
7e26925933 Added the --and flag for matching multiple patterns 2022-11-21 21:06:48 +01:00
Thayne McCombs
38d406876d Fix a couple small clippy warnings
- suppress warning about unused function on windows
- remove extraneous & in test
2022-11-11 02:12:58 -07:00
Thayne McCombs
b04cae2ca0 Only run owner root test on linux
Because macos doesn't have a "root" user
2022-11-02 23:55:31 -06: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
David Peter
f15be89bff Fix --threads/-j option value parsing 2022-11-02 13:32:22 +01:00
David Peter
ac35b11dc8 Change clap CLI binary name to 'fd' 2022-11-01 21:00:32 +01:00
David Peter
b57ed11f65
Merge pull request #1137 from amesgen/batch-exit-code
Respect exit codes with `--exec-batch`
2022-11-01 20:42:28 +01:00
David Peter
ebd48d406e Fix unit tests 2022-11-01 20:12:56 +01:00
amesgen
cb95f1dcd5
Respect exit codes with --exec-batch 2022-10-13 23:33:54 +02:00
Thayne McCombs
10ecb64ff3 Fix typo in test 2022-10-10 23:58:33 -06:00
Thayne McCombs
c41d61eeda Merge remote-tracking branch 'upstream/master' into clap-derive 2022-10-09 01:00:48 -06:00
Thayne McCombs
f4c34b81c7 Upgrade to clap 4.0 2022-10-08 23:51:45 -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
Tavian Barnes
4ffc34956f Make --strip-cwd-prefix apply to -x/-X
Fixes #898.
2022-10-03 21:35:39 +02:00
Tavian Barnes
4419401b6c Enable --strip-cwd-prefix by default except with -0
Fixes #1046.
2022-09-27 20:56:24 +02:00
Sijmen
a0062b9a1b Disable invalid CWD test on Windows 2022-08-10 20:01:21 +02:00
Sijmen
922f127aca Add test when running from non-existent directory
When fd is run from a non-existent directory, but a search path is
passed in the arguments, it should still run. This tests for that.
2022-08-10 20:01:21 +02:00
David Peter
941f712975 Fix (pointless) clippy suggestion 2022-05-28 22:40:07 +02:00
Tavian Barnes
40b368e761 exec: Execute batches before they get too long
Fixes #410.
2022-05-28 22:19:47 +02:00
David Peter
41affe18c4 Merge remote-tracking branch 'origin/master' into yyogo/master 2022-05-15 16:31:06 +02:00
Jackson Theel
cbf3f11cf8 Make -u idempotent 2022-05-15 16:22:24 +02:00
Thayne McCombs
50c0fa812f
Merge branch 'master' into master 2022-03-15 01:20:35 -06:00
Thayne McCombs
9f39f1d75b Add tests for multiple execs 2022-03-08 10:15:48 +01:00
Thayne McCombs
43f276e073 Upgrade to clap 3.0
This wasn't backwards compatible so required some more substantial
changes.
2022-01-07 23:56:03 -07:00
Thayne McCombs
06cd391845 Change test_opposing to be less flaky.
Make it resilient to the different invocations returning results in
different orders.
2022-01-07 03:10:09 -07:00
Thayne McCombs
b7e077320d
Fix logic for --no-ignore-parent (#908)
Make sure that using `--no-ignore-vcs` or `--no-ignore` don't also
enable `--no-ignore-parent`. So that if `--no-ignore-vcs` is enabled, it
continues to respect .fdignore and .ignore in the parent directories.

Fixes: #907
Fixes: #901
2021-12-22 23:38:00 -07:00
Jonathan Goren
1153e3e155 tests: fix for trailing slashes 2021-12-11 15:43:24 +02:00
David Peter
92bd7850d0 Merge remote-tracking branch 'origin/master' into no-strip/760 2021-11-26 18:19:28 +01:00
David Peter
47421a49b8 Remove strip-prefix placeholders 2021-11-26 17:58:18 +01:00
David Peter
4d7e34ad59 Rename option to strip_cwd_prefix, rename CLI option 2021-11-26 17:46:04 +01:00
David Peter
13cdfb32f8 Remove outdated comment 2021-11-26 17:40:07 +01:00
David Peter
cdc6a37ed6 Merge remote-tracking branch 'origin/master' into pr/opposing-options 2021-11-14 16:47:53 +01:00
Devon Hollowood
17dd2a6dfe
Implement --batch-size (#866) 2021-10-22 00:05:13 -06:00
Jonah Caplan
bf9e6fd36e add -P option to strip prefix to tty 2021-10-17 00:29:51 -04:00
Jonah Caplan
46db1c4ef3 add {-} format for exec 2021-10-16 23:52:04 -04:00
Jonah Caplan
b9cb5d54a4 fixup tests 2021-10-16 23:13:27 -04:00
Jonah Caplan
fbc836b553 Revert -X stuff
This reverts commit 91860bf682.
2021-10-16 14:03:23 -04:00
Jonah Caplan
91860bf682 fmt 2021-10-16 00:02:37 -04:00
Jonah Caplan
b6f8bc8ff8 also handle -X and -x with no_strip 2021-10-15 23:57:03 -04:00
Jonah Caplan
12650a0913 add example to man page and correct test comment 2021-10-15 23:57:03 -04:00
Jonah Caplan
953f586f26 replace -N option with specifying '.' path 2021-10-15 23:57:03 -04:00
Jonah Caplan
08d913f167 cargo fmt fixup 2021-10-15 23:56:36 -04:00
Jonah Caplan
6b92c5db90 add -N/--no-strip option to show "./" prefix on relative paths 2021-10-15 23:56:36 -04:00
Tavian Barnes
7b5b3ec47b walk: Add a cache for DirEntry metadata 2021-10-13 09:13:44 +02:00
Tavian Barnes
476d404938
Merge pull request #817 from will459/add_no_ignore_parent
Add --no-ignore-parent flag
2021-09-01 13:22:01 -04:00