Skip to content

fix: prepend **/ to glob patterns when using --full-path#1993

Open
argon17 wants to merge 2 commits intosharkdp:masterfrom
argon17:fix/glob-full-path
Open

fix: prepend **/ to glob patterns when using --full-path#1993
argon17 wants to merge 2 commits intosharkdp:masterfrom
argon17:fix/glob-full-path

Conversation

@argon17
Copy link
Copy Markdown

@argon17 argon17 commented May 5, 2026

When using '--glob' with '--full-path' together, globset always generates fully-anchored regexes (^...$), so patterns like 'c.foo' or 'one/**/c.foo' never matches against the absolute path, because the regex requires the match to start at the very beginning of the string, but the full path will always start with '/'.

Fixed by prepending **/ to the glob pattern when '--full-path' is set and the pattern doesn't already start with / or **/.

Fixes #1650

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Glob pattern that uses ** does not seem to work

1 participant