glob-match icon indicating copy to clipboard operation
glob-match copied to clipboard

Leading doublestar inside braces fails to match

Open gsoltis opened this issue 1 year ago • 0 comments

If you have a glob that starts with a **, the behavior changes based on whether or not you wrap it in {}s. For instance:

assert!(glob_match("**/*b", "ab"));
assert!(glob_match("{**/*b}", "ab"));

The first assert passes, whereas the second one does not. I believe the issue is here, where the code to detect a leading doublestar is hardcoded to compare against the start of the glob, rather than the start of the current option inside the braces.

gsoltis avatar May 11 '23 21:05 gsoltis