Commit Graph

46 Commits

Author SHA1 Message Date
Daniel Hofstetter bb71ee31a5 xargs: add --max-lines 2024-03-27 16:45:35 +01:00
Daniel Hofstetter 55f297fd88 tests: remove "extern crate x" 2024-03-26 16:14:24 +01:00
Daniel Hofstetter e66a7c1df5 xargs: adapt code to clap changes 2024-03-14 16:52:40 +01:00
Daniel Hofstetter f2bf4b0fd9 find: fix "item x imported redundantly" warnings 2024-02-26 09:47:24 +01:00
Daniel Hofstetter b87d04b51b xargs: rename --size to --max-chars 2024-02-21 15:28:46 +01:00
Jelle Helsen 6068512549 added some tests to improve coverage 2023-08-13 21:27:46 +02:00
Shiv 2011a7adfa implemented assert! for resolving warning panic! (#227)
* implemented assert! for resolving warning panic!
2023-04-07 08:56:17 +02:00
John Vandenberg 6be211a336 Fix spelling 2023-04-07 13:21:50 +08:00
Sylvestre Ledru e4121cc988 Fix more clippy warnings 2023-04-02 18:56:31 +02:00
Sylvestre Ledru d7bb67e53d Fix more clippy warnings 2023-04-02 18:53:40 +02:00
Sylvestre Ledru 3f6ac572e1 fix some clippy warnings 2023-04-02 18:51:29 +02:00
Jez Ng 30a22453d6 Add support for embedded "{}"
Given

  find . -exec foo{}bar \;

GNU find will replace `{}` by the filename. This commit matches that
behavior.

Note that this is not required by the POSIX spec.

The GNU testsuite doesn't cover this case, so I've added a test in this
repo.
2023-02-23 23:38:40 +01:00
Sylvestre Ledru 6bad054a5e Merge branch 'main' into stat 2022-06-06 09:43:46 +02:00
Tavian Barnes f967b29735 find/matchers: Implement the -{read,writ,execut}able access checks 2022-06-01 11:22:12 -04:00
Sylvestre Ledru dbde7abdc2 Merge branch 'main' into stat 2022-06-01 08:42:44 +01:00
Sylvestre Ledru a9241678e5 Merge pull request #166 from tavianator/right-sed-ed
find/matchers: Add the `ed` and `sed` regex types
2022-06-01 08:40:06 +01:00
Tavian Barnes 7c3268d9ef tests: Add integration tests for find -inum and -links 2022-05-31 17:09:43 -04:00
Tavian Barnes 972ac0bbff tests: Add integration tests for find -regextype ed/sed 2022-05-31 17:02:59 -04:00
Tavian Barnes 1bfbe7623e tests: Add a simple integration test for find -mount/-xdev 2022-05-31 17:01:35 -04:00
Tavian Barnes 0b23d9b202 find: Add integration tests for -perm 2022-03-23 13:34:09 -04:00
Sylvestre Ledru 4eb943fea2 rustfmt recent changes 2022-02-05 15:16:36 +01:00
Sylvestre Ledru f399291533 fix clippy warning: Fix the needless_pass_by_value 2022-02-05 15:09:29 +01:00
Sylvestre Ledru 384aa23e74 fix clippy warning: use Self when possible 2022-02-05 15:06:18 +01:00
Ryan Gonzalez efa2a4b553 Add support for -empty
Signed-off-by: Ryan Gonzalez <ryan.gonzalez@collabora.com>
2022-01-26 19:17:46 -06:00
Ryan Gonzalez 3a1c42123f Add an initial implementation of xargs
This includes much of the core xargs functionality, with the following
notable exceptions:

- Parallel execution (`-P`): This option currently just does
  nothing, that way anything that passes -P can at least run without a
  notable behavior shift (other than simply being slower).
- Replacement strings (`-I`): This can easily be worked around via an
  intermediate shell invocation (e.g. `xargs -L1 sh -c 'do-things-with
  $@' --`).
- EOF strings (`-E`): I've honestly never seen this actually used,
  though it would not be particularly difficult to implement given the
  current architecture.

Closes #37

Signed-off-by: Ryan Gonzalez <ryan.gonzalez@collabora.com>
2022-01-22 20:22:01 -06:00