Repository navigation
Replies: 2 comments
|
File types only ever match against the file name, not the path. In // We only want to match against the file name, so extract it.
let name = match file_name(path.as_ref()) { ... };
self.set.matches_into(name, &mut *matches);So for Why What does work: rg --hidden -g '**/.github/workflows/*.{yml,yaml}' 'no excuse'With the leading If you want it as a reusable "type", a shell alias or function is the simplest option, because a alias rgci="rg --hidden -g '**/.github/workflows/*.{yml,yaml}' -g '**/.gitlab-ci.yml' -g '**/.circleci/config.yml'"I checked this with ripgrep 15.2.0: |
|
Slashes are accepted syntactically because a leading For path matching, use rg --hidden -g '**/.github/workflows/*.{yml,yaml}' 'no excuse'If you want a reusable preset for CI workflows, a shell alias or a |
Uh oh!
There was an error while loading. Please reload this page.
I was trying to determine if I could use
--type-addto declare a type that matches GitHub Actions workflows (among other types of CI config), but it appears that although ripgrep accepts a slash inside thetype-addargument, it never matches anything:...followed by the rest of my github actions files.
Is there a way to make this work? Also, will
--type-add foo:bar/bazever match anything, and if not, could this be made a hard "invalid definition" error (the way--type-add bar/baz:fooalready is)?All reactions