Ripgrep
-u, --unrestricted
This flag reduces the level of “smart” filtering. Repeated uses (up to 3) reduces the filtering even more. When repeated three times, ripgrep will search every file in a directory tree.
A single -u/–unrestricted flag is equivalent to --no-ignore. Two -u/–unrestricted flags is equivalent to --no-ignore -./–hidden. Three -u/–unrestricted flags is equivalent to --no-ignore -./–hidden --binary.
The only filtering ripgrep still does when -uuu is given is to skip symbolic links and to avoid printing matches from binary files. Symbolic links can be followed via the -L/–follow flag, and binary files can be treated as text files via the -a/–text flag.
1
https://man.archlinux.org/man/extra/ripgrep/rg.1.en
Manual filtering: file types
By default, ripgrep comes with a bunch of pre-defined types. Generally, these types correspond to well known public formats. But you can define your own types as well. For example, perhaps you frequently search “web” files, which consist of JavaScript, HTML and CSS:
1
$ rg --type-add 'web:*.html' --type-add 'web:*.css' --type-add 'web:*.js' -tweb title
or, more succinctly,
1
2
3
$ rg --type-add 'web:*.{html,css,js}' -tweb title
https://github.com/BurntSushi/ripgrep/blob/master/GUIDE.md
Comments powered by Disqus.