ripgrep 15.2: recursive search that skips hidden files and noise

Summary

ripgrep is a recursive search tool written in Rust. Version 15.2 honours three layers of ignore rules by default, steps around hidden files and irrelevant directories, and still offers type filters, a PCRE2 engine and search inside compressed files.

Recommend
Name
ripgrep
Version
15.2
Pricing
Free
Open source
Open source
Operating system
WindowsmacOSLinux
Updated
2026-10-19 20:58

ripgrep turns recursive search into the default act. Type rg and a pattern at the root of a project and it matches across the whole tree while stepping around ignored directories, hidden files and binaries. Version 15.2, released in July 2026, is the current stable build.

The defaults do the subtraction for you

In a project of any size, the code you actually want is a small part of the tree. Build output, dependency caches, logs and editor scratch files lie scattered about, and narrowing the scope folder by folder costs attention and still misses things. ripgrep, whose command is rg, puts the filtering first. By default it reads three sets of ignore rules, from .gitignore, .ignore and .rgignore, skips hidden directories and anything judged binary, and searches only where source code plausibly lives. None of that needs configuring, and it works the moment the binary is installed.

There is a way out when everything has to be seen. Adding -uuu switches the automatic filtering off in one go, and ignored, hidden and binary files all return to scope. Restrained by default, open when asked, and that trade runs through the whole design of the options.

screenshot

Narrowing again by file type

When you know which kind of file you are after, -t keeps only the named type and -T shuts one type out. Hunting a script, reading a configuration, looking through documentation, each uses its own type, and no unrelated extension sneaks into the results. Types can be defined beyond the built in set, and once registered a custom type is called with -t just like a built in one.

The regular expression engine can be swapped

The default is the regular expression engine that ships with Rust, whose syntax covers daily searching and which will not fall into the runaway backtracking trap. Where lookaround or back references are genuinely needed, -P switches to the PCRE2 engine and those constructs become available. To avoid remembering the flag, --auto-hybrid-regex lets the program pick as the pattern requires, and --engine names the choice among default, PCRE2 and automatic. Switching only changes what the syntax can express. Recursive search and the habit of skipping hidden files stay as they were.

Searching inside compressed files

With -z added, seven compressed formats, gzip, bzip2, xz, lz4, lzma, zstandard and brotli, no longer need unpacking first, and the text inside is matched as if it were an ordinary file. Archived logs and packed offline documentation normally have to be extracted before they can be read, and now one command goes through them.

For binary documents such as PDF, --pre attaches a preprocessing command that turns the file into text before ripgrep sees it. The command is yours, so the conversion is not restricted, and a scanned document can be brought in once text extraction has run.

Room on encoding and configuration

Text encoding is treated as UTF-8 by default, and UTF-16 files carrying a BOM are recognised automatically. For latin-1, GBK, EUC-JP or Shift_JIS, name the encoding with -E rather than converting the file first. In an older project holding documents in several encodings, this saves the round trips that otherwise eat the time.

The configuration file is another convenience. Put the usual default arguments into it and every later call carries them, so nothing has to be retyped on the command line. For anyone typing rg many times a day, that beats memorising flags.

Where the speed actually comes from

None of the speed tricks are exotic. The engine uses finite automata helped by SIMD instructions and literal optimisation. A single file is mapped into memory while a large directory switches to incremental reads through an intermediate buffer, and the program picks whichever suits better. Ignore rules are matched against several globs at once through a RegexSet, so skipping irrelevant directories costs little in itself. Directory walking runs in parallel without locks. In the published benchmark, one query against the complete Sherlock Holmes takes about a second.

Version and licence

Version 15.2.0 came out on 15 July 2026, with the changes centred on a gitignore matching defect during searches across directories, along with better directory walking times in very large repositories. The project is dual licensed under MIT and the Unlicense, the code is public on GitHub, it is maintained by Andrew Gallant, known as BurntSushi, and native binaries are offered for Windows, macOS and Linux.

The value of ripgrep is not the number of options but how right the defaults are. Ignore rules apply on their own, hidden files and irrelevant directories stay outside, and when everything is needed a single -uuu brings the whole set back. Hand that kind of small judgement to the tool and searching returns to what it was meant to be.

ripgrepDownload
Supported systems: Windows macOS Linux