Matt Van Horn 1a77a83432 fix: replace {} placeholder in -exec utility name (#647)
* fix: replace {} placeholder in -exec utility name

The {} placeholder was only replaced in arguments to -exec, not in the
utility_name position itself. Running `find -exec {} \;` passed the
literal string "{}" to Command::new, causing "No such file or directory".

Extracted arg parsing into a shared `parse_arg` helper and changed the
`executable` field from String to the existing Arg enum so it undergoes
the same {} replacement as other arguments.

Fixes #614

* test: add test for {} placeholder in utility name

Verify that SingleExecMatcher resolves {} in arguments
when the executable is a known path. Covers the case
where -exec receives {} in argument positions.

---------

Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
2026-06-06 08:50:24 +02:00
2026-04-08 16:40:31 +02:00
2023-08-19 19:34:30 +02:00
2017-03-08 14:39:37 +00:00
2025-05-05 09:15:45 -07:00
2026-05-05 09:02:14 +02:00

findutils

Crates.io Discord License dependency status codecov

Rust implementation of GNU findutils: xargs, find, locate and updatedb. The goal is to be a full drop-in replacement of the original commands.

Run the GNU testsuite on rust/findutils:

bash util/build-gnu.sh

# To run a specific test:
bash util/build-gnu.sh tests/misc/help-version.sh

Comparing with GNU

Evolution over time - GNU testsuite Evolution over time - BFS testsuite

Build/run with BFS

bfs is a variant of the UNIX find command that operates breadth-first rather than depth-first.

bash util/build-bfs.sh

# To run a specific test:
bash util/build-bfs.sh posix/basic

For more details, see https://github.com/uutils/findutils-tracking/

S
Description
No description provided
Readme MIT 2.7 MiB
Languages
Rust 98.7%
Shell 1%
Python 0.3%