Skip to content

ripgrep

15.2.0
BurntSushi/ripgrep

ripgrep recursively searches directories for a regex pattern while respecting your gitignore

Version of BurntSushi/ripgrep you run

CompareView on GitHub

Breaking changes

What to check before upgrading, taken from the notes of the last 30 releases.

  • 14.0.0Nov 26, 2023

    BREAKING CHANGES

    • rg -C1 -A2 used to be equivalent to rg -A2, but now it is equivalent to

    rg -B1 -A2. That is, -A and -B no longer completely override -C.

    Instead, they only partially override -C.

    Build process changes:

    • ripgrep's shell completions and man page are now created by running ripgrep

    with a new --generate flag. For example, rg --generate man will write a

    man page in roff format on stdout. The release archives have not changed.

    • The optional build dependency on asciidoc or asciidoctor has been

    dropped. Previously, it was used to produce ripgrep's man page. ripgrep now

    owns this process itself by writing roff directly.

    Performance improvements:

    Make some cases with inner literals faster.

    Make most searches with \b look-arounds (among others) much faster.

    Parallel directory traversal now uses work stealing for faster searches.

    Parallel directory traversal has some contention reduced.

    Feature enhancements:

    • Added or improved file type filtering for Ada, DITA, Elixir, Fuchsia, Gentoo,

    Gradle, GraphQL, Markdown, Prolog, Raku, TypeScript, USD, V

  • 11.0.0Apr 15, 2019

    BREAKING CHANGES

    • ripgrep has tweaked its exit status codes to be more like GNU grep's. Namely,

    if a non-fatal error occurs during a search, then ripgrep will now always

    emit a 2 exit status code, regardless of whether a match is found or not.

    Previously, ripgrep would only emit a 2 exit status code for a catastrophic

    error (e.g., regex syntax error). One exception to this is if ripgrep is run

    with -q/--quiet. In that case, if an error occurs and a match is found,

    then ripgrep will exit with a 0 exit status code.

    • Supplying the -u/--unrestricted flag three times is now equivalent to

    supplying --no-ignore --hidden --binary. Previously, -uuu was equivalent

    to --no-ignore --hidden --text. The difference is that --binary disables

    binary file filtering without potentially dumping binary data into your

    terminal. That is, rg -uuu foo should now be equivalent to grep -r foo.

    • The avx-accel feature of ripgrep has been removed since it is no longer

    necessary. All uses of AVX in ripgrep are now enabled automatically via

    runtime CPU feature detection. The simd-accel feature does remain available

    (only for enabling SIMD for transcoding), however, it does increase

    compilation times substantially at the moment.

    Performance improvements:

    PERF #838:

    Make rg -F -f dictionary-of-literals much faster.

    Feature enhancements:

    • Added or improved file type filtering for Apache Thrift, ASP, Bazel, Brotli,
  • 0.10.0Sep 7, 2018

    BREAKING CHANGES

    • The minimum version required to compile Rust has now changed to track the

    latest stable version of Rust. Patch releases will continue to compile with

    the same version of Rust as the previous patch release, but new minor

    versions will use the current stable version of the Rust compile as its

    minimum supported version.

    • The match semantics of -w/--word-regexp have changed slightly. They used

    to be \b(?:)\b, but now it's

    (?:^|\W)(?:)(?:$|\W). This matches the behavior of GNU grep

    and is believed to be closer to the intended semantics of the flag. See

    #389 for more details.

    Feature enhancements:

    libripgrep is now a thing. The primary crate is

    grep.

    Add -U/--multiline flag that permits matching over multiple lines.

    Add -P/--pcre2 flag that gives support for look-around and backreferences.

    Add --json flag that prints results in a JSON Lines format.

    Add --one-file-system flag to skip directories on different file systems.

  • 0.9.0Aug 3, 2018

    BREAKING CHANGES

    • When --count and --only-matching are provided simultaneously, the

    behavior of ripgrep is as if the --count-matches flag was given. That is,

    the total number of matches is reported, where there may be multiple matches

    per line. Previously, the behavior of ripgrep was to report the total number

    of matching lines. (Note that this behavior diverges from the behavior of

    GNU grep.)

    • Octal syntax is no longer supported. ripgrep previously accepted expressions

    like \1 as syntax for matching U+0001, but ripgrep will now report an

    error instead.

    • The --line-number-width flag has been removed. Its functionality was not

    carefully considered with all ripgrep output formats.

    See #795 for more

    details.

    Feature enhancements:

    • Added or improved file type filtering for Android, Bazel, Fuschia, Haskell,

    Java and Puppet.

    Add a --stats flag, which emits aggregate statistics after search results.

    Add a --no-ignore-messages flag, which suppresses parse errors from reading

    .ignore and .gitignore files.

    Support \u{..} Unicode escape sequences.

  • 0.8.0Feb 12, 2018

    BREAKING CHANGES

    Note that these are all very minor and unlikely to impact most users.

    • In order to support configuration files, flag overrides needed to be

    rethought. In some cases, this changed ripgrep's behavior. For example,

    in ripgrep 0.7.1, rg foo -s -i will perform a case sensitive search

    since the -s/--case-sensitive flag was defined to always take precedence

    over the -i/--ignore-case flag, regardless of position. In ripgrep 0.8.0

    however, the override rule for all flags has changed to "the most recent

    flag wins among competing flags." That is, rg foo -s -i now performs a

    case insensitive search.

    • The -M/--max-columns flag was tweaked so that specifying a value of 0

    now makes ripgrep behave as if the flag was absent. This makes it possible

    to set a default value in a configuration file and then override it. The

    previous ripgrep behavior was to suppress all matching non-empty lines.

    • In all globs, [^...] is now equivalent to [!...] (indicating class

    negation). Previously, ^ had no special significance in a character class.

    • For downstream packagers, the directory hierarchy in ripgrep's archive

    releases has changed. The root directory now only contains the executable,

    README and license. There is now a new directory called doc which contains

    the man page (previously in the root), a user guide (new), a FAQ (new) and

    the CHANGELOG (previously not included in release). The complete

    directory remains the same.

    Feature enhancements:

    • Added or improved file type filtering for
  • 0.4.0Jan 14, 2017

    BREAKING CHANGE: The --column flag now implies --line-number.

    BREAKING CHANGE: Completely remove ^C handling from ripgrep.

Release history

All releases on GitHub
BadgeLatest version of BurntSushi/ripgrep[![version](/badge/BurntSushi/ripgrep)](/p/BurntSushi/ripgrep)

Sponsorship is appreciated!

This release fixes a number of bugs related to gitignore matching as well as

some performance improvements in directory tree traversal.

> In case you haven't heard of it before, ripgrep is a line-oriented search

> tool that recursively searches the current directory for a regex pattern.

> By default, ripgrep will respect gitignore rules and automatically skip

> hidden files/directories and binary files.

Platform support:

  • aarch64-unknown-linux-musl is now included in the release binaries for

ripgrep.

Performance improvements:

Improves directory traversal time on very large corpora.

Feature enhancements:

ripgrep now respects GIT_CONFIG_GLOBAL and GIT_CONFIG_SYSTEM.

Bug fixes:

Don't check for the existence of .jj when --no-ignore is used.

BUG #3376,

BUG #3419:

Fix gitignore matching bug when searching across multiple directories.

Full release notesCompare with previous