4 ms·
> 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
by burntsushi 9y 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`.
- deleted 9y ago[deleted]
- StavrosK 9y agoAh, 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.