Hacker News new | ask | show | jobs
by burntsushi 3164 days ago
> don't bother unless you find ag slow

Or if you want more correct gitignore matching.

> (I remember the --python option, but have no idea how to filter with rg)

    rg -tpy 'def __init__'
or, to exclude Python files

    rg -Tpy 'def __init__'
You can see the list of types available with `rg --type-list`.
1 comments

Ah, thanks for that, I didn't even know rg had types (I thought -t accepted the actual extensions). I'm not saying your tool is worse than ag, just that it doesn't make sense to switch if you're not having problems with ag.