261028.3.1 · 23815624819c77ab665e19c8e6c28bddbcd96e1d
refactor: different pattern types
This significantly refactors the code for creating the regexes to match with, and in some cases avoids using regex altogether.
We now have differnt types of patterns that we match with.
One impact of this is that we now use GlobSet to match directly, which should fix #2067 and allow globs to work correctly in windows with --full-path.
reading declarations
Changes to src/cli.rs. All files
@@ -641,13 +641,11 @@ pub struct Opts { /// is considered a match. If your pattern starts with a dash (-), make sure to /// pass '--' first, or it will be considered as a flag (fd -- '-foo'). #[arg(- default_value = "",- hide_default_value = true, value_name = "pattern", help = "the search pattern (a regular expression, unless '--glob' is used; optional)", long_help )]- pub pattern: String,+ pub pattern: Option<String>, /// Set the path separator to use when printing file paths. The default is /// the OS-specific separator ('/' on Unix, '\' on Windows).