This is a work-in-progress draft version.
ripgrep
ripgrep
is definitely becoming a popular alternative (if not the most popular) to the grep
command. Editors like Visual Studio Code and Atom are using ripgrep
to power their search offerings. The major selling point is its default behavior for recursive search and speed. The project doesn't aim to be compatible with POSIX and behavior varies with respect to GNU grep
in terms of features, option names, output style, regular expressions, etc.
Project links
- github: ripgrep
- issue manager
- discussions
- User guide
- FAQ
- Benchmark with other grep implementations — published in 2016
See Feature comparison of ack, ag, git-grep, GNU grep and ripgrep for a quick overview between different
grep
implementations.
Installation
See ripgrep: installation for details on various methods and platforms. Instructions shown below is for Debian-like distributions.
$ # link shown here on two lines as it is too long
$ # visit using the first part to get latest version
$ link='https://github.com/BurntSushi/ripgrep/releases/'
$ link="$link"'download/12.1.1/ripgrep_12.1.1_amd64.deb'
$ wget "$link"
$ sudo gdebi ripgrep_12.1.1_amd64.deb
$ # note that the installed command name is rg, not ripgrep
$ rg --version
ripgrep 12.1.1 (rev 7cb211378a)
-SIMD -AVX (compiled)
+SIMD -AVX (runtime)
Documentation
It is always a good idea to know where to find the documentation. From command line, you can use man rg
for the manual and rg -h
for a list of all the options. See also ripgrep: User guide.
See mankier: rg for an online version of the manual.
See docs.rs: regex for Rust regex syntax.