Commit activity
Last 12 weeks · 109 commits
Community health
3 of 6 standards met
Recent PRs & issues
Fixes #2078 (or ) accepted an unbounded , which was then used to construct a channel with capacity and to spawn worker threads. Excessive values overflowed the multiplication (exit 101) or exhausted thread-spawn limits (exit 134). The value is now parsed and validated up front, rejecting values above 1024 with a normal user-facing error instead of panicking/aborting. Test plan now prints an error and exits 2 instead of panicking. still works.
I'd like to use for checking for presence of stale file handles. Currently I can do: to get a command with a non-zero exit code in presence of such file system errors. However, having to output all the paths makes this much slower than running quietly. Ideally one or more of the following alternatives should work. 1 Output errors even when rest is silenced 2 When there are file system errors output a non-zero exit code 3 Option to give non-zero exit code in presence of file system errors would either exit with non-zero exit code on first file system error or after everything if there was any file system error.
Closes https://github.com/sharkdp/fd/issues/362. See https://github.com/BurntSushi/ripgrep/pull/772 for the corresponding ripgrep implementation, which this is inspired by. I find myself almost-always wanting to not have files in ignored when searching -- quite frequently I find myself confused and frustrated, until realizing that fd is skipping them by-default. So I now have an abbreviation set up in my shell (fish) to expand into . This is ugly, however, and makes it difficult to use when searching through command history and modifying old commands. So I've found myself wanting for a ripgrep-style configuration file feature in , since for ripgrep I can just set and stick in there and be done with it. The implementation here is short and simple, and piggy-backs off of as much existing parsing logic as possible. In the future, this opens the door to removing special-case code for the global file. What could be done instead is what ripgrep does: is set to , in .
Recent fixes
Fixes #2067. On Windows, never matches because the search string uses native separators while globset compiles glob patterns into regexes that use . Change: Normalize backslashes to forward slashes in before regex matching. The original path is still used for output — normalization only affects matching. Regression verified (fail-before / pass-after): Tests added* (Windows-specific unit tests in ): — relative path with base — absolute path All 149 unit tests pass. The 92 integration test failures are pre-existing on Windows (the integration tests use Unix path assumptions and were already failing before this change). Health disclosure: this pull request was implemented with the assistance of an AI coding tool. The change was reviewed and verified manually, including fail-before/pass-after regression testing and the full unit test suite.
In glob mode the search regex is taken straight out of globset, which always emits as the separator, both for literals ( in a pattern is parsed as on Windows) and for the generated , , constructs. globset's own matcher completes that contract by normalizing the candidate in , but fd uses the extracted regex directly, so with --full-path the pattern was -separated while the candidate was a native Windows path and nothing ever matched. Normalize the candidate the same way globset does, but only when it can matter: --glob together with --full-path. --regex overrides --glob, so native-separator regexes keep seeing unmodified paths. See #2067. Alternative to another (also good!) approach of #2074
Repository: sharkdp/fd. Description: A simple, fast and user-friendly alternative to 'find' Stars: 45089, Forks: 1369. Primary language: Rust. Languages: Rust (93%), Shell (6.2%), Makefile (0.6%), Awk (0.2%). License: Apache-2.0. Topics: cli, command-line, filesystem, hacktoberfest, regex, rust, search, terminal, tool. Latest release: v10.5.2 (1w ago). Open PRs: 74, open issues: 132. Last activity: 3d ago. Community health: 85%. Top contributors: sharkdp, tmccombs, dependabot[bot], tavianator, reima, alexmaco, jcaplan, marionebl, mmstick, FallenWarrior2k and others.