Commit Graph
5 Commits
Author SHA1 Message Date
Terts Diepraam b2a74e221c initial oranda setup 2023-08-19 19:34:30 +02:00
Ryan Gonzalez 0ea822cecb Add support for GNU-compatible printf
This adds initial support for GNU find-compatible printf syntax. As far
as I can tell, it should implement all the specifiers, with the
following exceptions:

- Using zero as padding instead of space: GNU find isn't consistent with
  which numeric format specifiers support this.
- Specifying precision (`%x.yz`): I believe sparseness (%S)
  and seconds-since-epoch (`%A@` / `%C@` / `%T@`) are the only ones that
  allow this, making it only partially useful.
- Printing SELinux contexts (`%Z`): requires some extra dependencies and
  isn't within our scope.

uucore is added as a dependency, because it has several utility
functions that we need, the complexity of which is high enough that
using the extra dependency is quite helpful.

This also stubs out many of the specifiers for Windows, simply because I
have no idea how these should work there. (The defaults chosen should be
"good enough" for the moment, though.)

Signed-off-by: Ryan Gonzalez <ryan.gonzalez@collabora.com>
2021-12-27 13:44:35 -06:00
Saeed Rasooli 5df7725283 type_matcher.rs: add support for: l b c p s 2021-03-01 11:18:53 +03:30
mcharsleyandGitHub 3198ff3b82 Initial dump of my code (#1)
* Initial checkin. Supports -name, -name -print and a subset of -type

Has unit tests, but no system tests

* Corrected usage text

* Added ability to replace stdout with a fake. Moved and_matcher to
logical_matchers

* Significant refactoring to allow tests for the arg-parsing code

* Added tests for the argument parsing code.

* Added support for or operator

* Added change missing form last commit

* Added AUTHORS and (MIT) LICENSE

* Added support for lists (i.e. the comma operand)

* Added support for parentheses

* Cleaned up names of some Or/And/List matcher methods

* Added support for depth-first searching

* Added initial support for max_depth, min_depth and depth arguments.

* Cleaned up a surfeit of Box::new's and change the [Or|And|List]Matchers
to use builders, so submatchers can't be added later on.

* Added support for -a

* Added support for prune

* Added prune

* Refactored the way we fake stdoutput.

Will allowing for easy expansion for stderr, clocks etc.

* Renamed side effects to matcherio

* Removed leftover tracing println call

* Tidied up use statements

* Switched to using walkdir

* Added support for -newer

* renamed new_sideeffetcs to new_matcher_io

* Implemented ctime, atime and mtime

* merged name_matcher and caseless_name_matcher into one module

* Added support for -size

* Minor tweaks based on code review

* Switched Config struct to implement Default

* Replaced try! with ?

* Added copyright headers
2017-03-08 14:39:37 +00:00
Mark Charsley d26924b896 Added .gitignore 2017-03-01 09:36:46 +00:00