Last 12 weeks · 39 commits
3 of 6 standards met
Checks [x] I have read the troubleshooting section and still think this is a bug. Describe the bug you encountered: If invoked with , fd fails with the following error However, this behavior is inconsistent. The error message is only printed when the pattern also happens to be an existing directory. Otherwise, returns no error, and silently finds no files. Describe what you expected to happen: I would expect the error about how a pattern with a '/' in it will not lead to any search results to be displayed regardless of the pattern possibly being a directory path. What version of are you using? fd 10.3.0 Which operating system / distribution are you on?
Repository: sharkdp/fd. Description: A simple, fast and user-friendly alternative to 'find' Stars: 41931, Forks: 985. Primary language: Rust. Languages: Rust (93.1%), Shell (6.5%), Makefile (0.4%). License: Apache-2.0. Topics: cli, command-line, filesystem, hacktoberfest, regex, rust, search, terminal, tool. Latest release: v10.3.0 (6mo ago). Open PRs: 37, open issues: 133. Last activity: 4d ago. Community health: 85%. Top contributors: sharkdp, tmccombs, dependabot[bot], tavianator, reima, alexmaco, jcaplan, marionebl, mmstick, FallenWarrior2k and others.
Rust
matches a pattern against the absolute path instead of the relative one. This is not well documented and it's a possible cause of confusion (e.g. #769). In my opinion, it is also less ergonomic than matching against the relative path of a candidate. My suggestion is: Replace with to make it clear this matches against the absolute path Add a new flag to allow matching against the relative path Thank you for the great work and for your focus on usability!
Overview Currently, can filter hidden/ignored files from search results according to the following flags: , , : Show/omit search results from files and directories ignored by rules/patterns in '.gitignore', '.ignore', '.fdignore', or the global ignore files. , : Show/omit search results from hidden dot files. : Show both the ignored and hidden files. This gives us two kinds of results: 1. A "restricted" mode with the paths matched by the search patterns but without the files/folders in hidden/ignored paths. 2. A "mixed" mode with all the paths matched by the search patterns, disregarding when it is or isnt't in a hidden/ignored path. Proposal Add a new flag like to filter out files/folders that are not under ignore/hidden paths. This will yield a third mode where the search result will omit "restricted" entries but will show files/folders that are under ignore/hidden paths. This new flag can also be combined with flags and to further restrict the search results. Use cases Searching only in hidden folders like () Searching only non-committed files under rules in Git repositories