Comment by zem

Comment by zem 8 hours ago

2 replies

the one thing i'd love to see added is an "extension" flag, equivalent to -g but which treats the provided arg as an extension (so `rg -e c,h` instead of `rg -g '*.{c,h}'`). 99% of the time I use glob patterns it's to match on extension.

burntsushi 8 hours ago

Have you seen the `-t/--type` flag? Your example could be written `-tc`. And for common ones that aren't in ripgrep already, you can define your own types.

  • zem 8 hours ago

    I have, and it's a very neat feature :) it just feels like extra ceremony to define my own type the first time I need a custom glob, though it would probably pay off in the long run