Skip to content

Releases: BurntSushi/ripgrep

14.1.0

06 Jan 19:41
14.1.0
e50df40
Compare
Choose a tag to compare

Sponsorship is appreciated!

This is a minor release with a few small new features and bug fixes. This
release contains a bug fix for unbounded memory growth while walking a
directory tree. This release also includes improvements to the completions for
the fish shell, and release binaries for several additional ARM targets.

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.

Bug fixes:

  • BUG #2664:
    Fix unbounded memory growth in the ignore crate.

Feature enhancements:

  • Added or improved file type filtering for Lean and Meson.
  • FEATURE #2684:
    Improve completions for the fish shell.
  • FEATURE #2702:
    Add release binaries for armv7-unknown-linux-gnueabihf,
    armv7-unknown-linux-musleabihf and armv7-unknown-linux-musleabi.

14.0.3

28 Nov 21:22
14.0.3
67ad991
Compare
Choose a tag to compare

Sponsorship is appreciated!

This is a patch release with a few small bug fixes.

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.

Bug fixes:

  • BUG #2664:
    Fix --sortr=path. I left a todo!() in the source. Oof.

14.0.2

28 Nov 02:45
14.0.2
6c7947b
Compare
Choose a tag to compare

Sponsorship is appreciated!

This is a patch release with a few small bug fixes.

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.

Bug fixes:

  • BUG #2654:
    Fix deb release sha256 sum file.
  • BUG #2658:
    Fix partial regression in the behavior of --null-data --line-regexp.
  • BUG #2659:
    Fix Fish shell completions.
  • BUG #2662:
    Fix typo in documentation for -i/--ignore-case.

14.0.1

26 Nov 22:36
14.0.1
59f86a4
Compare
Choose a tag to compare

Sponsorship is appreciated!

This a patch release meant to fix cargo install ripgrep on Windows.

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.

Bug fixes:

  • BUG #2653:
    Include pkg/windows/Manifest.xml in crate package.

14.0.0

26 Nov 19:28
14.0.0
93429d0
Compare
Choose a tag to compare

Sponsorship is appreciated!

ripgrep 14 is a new major version release of ripgrep that has some new
features, performance improvements and a lot of bug fixes.

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.

The headlining feature in this release is hyperlink support. In this release,
they are an opt-in feature but may change to an opt-out feature in the future.
To enable them, try passing --hyperlink-format default. If you use VS Code,
then try passing --hyperlink-format vscode. Please report your experience
with hyperlinks
, positive or negative.

Another headlining development in this release is that it contains a rewrite of
its regex engine. You generally shouldn't notice any changes, except for some
searches may get faster. You can read more about the regex engine rewrite on
my blog
. Please report your performance improvements or
regressions that you notice
.

Finally, ripgrep switched the library it uses for argument parsing. Users
should not notice a difference in most cases (error messages have changed
somewhat), but flag overrides should generally be more consistent. For example,
things like --no-ignore --ignore-vcs work as one would expect (disables all
filtering related to ignore rules except for rules found in version control
systems such as git).

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:

  • PERF #1746:
    Make some cases with inner literals faster.
  • PERF #1760:
    Make most searches with \b look-arounds (among others) much faster.
  • PERF #2591:
    Parallel directory traversal now uses work stealing for faster searches.
  • PERF #2642:
    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
  • FEATURE #665:
    Add a new --hyperlink-format flag that turns file paths into hyperlinks.
  • FEATURE #1709:
    Improve documentation of ripgrep's behavior when stdout is a tty.
  • FEATURE #1737:
    Provide binaries for Apple silicon.
  • FEATURE #1790:
    Add new --stop-on-nonmatch flag.
  • FEATURE #1814:
    Flags are now categorized in -h/--help output and ripgrep's man page.
  • FEATURE #1838:
    An error is shown when searching for NUL bytes with binary detection enabled.
  • FEATURE #2195:
    When extra-verbose mode is enabled in zsh, show extra file type info.
  • FEATURE #2298:
    Add instructions for installing ripgrep using cargo binstall.
  • FEATURE #2409:
    Added installation instructions for winget.
  • FEATURE #2425:
    Shell completions (and man page) can be created via rg --generate.
  • FEATURE #2524:
    The --debug flag now indicates whether stdin or ./ is being searched.
  • FEATURE #2643:
    Make -d a short flag for --max-depth.
  • FEATURE #2645:
    The --version output will now also contain PCRE2 availability information.

Bug fixes:

  • BUG #884:
    Don't error when -v/--invert-match is used multiple times.
  • BUG #1275:
    Fix bug with \b assertion in the regex engine.
  • BUG #1376:
    Using --no-ignore --ignore-vcs now works as one would expect.
  • BUG #1622:
    Add note about error messages to -z/--search-zip documentation.
  • BUG #1648:
    Fix bug where sometimes short flags with values, e.g., -M 900, would fail.
  • BUG #1701:
    Fix bug where some flags could not be repeated.
  • BUG #1757:
    Fix bug when searching a sub-directory didn't have ignores applied correctly.
  • BUG #1891:
    Fix bug when using -w with a regex that can match the empty string.
  • BUG #1911:
    Disable mmap searching in all non-64-bit environments.
  • BUG #1966:
    Fix bug where ripgrep can panic when printing to stderr.
  • BUG #2046:
    Clarify that --pre can accept any kind of path in the documentation.
  • BUG #2108:
    Improve docs for -r/--replace syntax.
  • BUG #2198:
    Fix bug where --no-ignore-dot would not ignore .rgignore.
  • BUG #2201:
    Improve docs for -r/--replace flag.
  • BUG #2288:
    -A and -B now only each partially override -C.
  • BUG #2236:
    Fix gitignore parsing bug where a trailing \/ resulted in an error.
  • BUG #2243:
    Fix --sort flag for values other than path.
  • BUG #2246:
    Add note in --debug logs when binary files are ignored.
  • BUG #2337:
    Improve docs to mention that --stats is always implied by --json.
  • BUG #2381:
    Make -p/--pretty override flags like --no-line-number.
  • BUG #2392:
    Improve global git config parsing of the excludesFile field.
  • BUG #2418:
    Clarify sorting semantics of --sort=path.
  • BUG #2458:
    Make --trim run before -M/--max-columns takes effect.
  • BUG #2479:
    Add documentation about .ignore/.rgignore files in parent directories.
  • BUG #2480:
    Fix bug when using inline regex flags with -e/--regexp.
  • BUG #2505:
    Improve docs for --vimgrep by mentioning footguns and some work-arounds.
  • BUG #2519:
    Fix incorrect default value in documentation for --field-match-separator.
  • BUG #2523:
    Make executable searching take .com into account on Windows.
  • BUG #2574:
    Fix bug in -w/--word-regexp that would result in incorrect match offsets.
  • BUG #2623:
    Fix a number of bugs with the -w/--word-regexp flag.
  • BUG #2636:
    Strip release binaries for macOS.

13.0.0

12 Jun 12:27
13.0.0
af6b6c5
Compare
Choose a tag to compare

ripgrep 13 is a new major version release of ripgrep that primarily contains
bug fixes, some performance improvements and a few minor breaking changes.
There is also a fix for a security vulnerability on Windows
(CVE-2021-3013).

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.

Some highlights:

A new short flag, -., has been added. It is an alias for the --hidden flag,
which instructs ripgrep to search hidden files and directories.

ripgrep is now using a new
vectorized implementation of memmem,
which accelerates many common searches. If you notice any performance
regressions (or major improvements), I'd love to hear about them through an
issue report!

Also, for Windows users targeting MSVC, Cargo will now build fully static
executables of ripgrep. The release binaries for ripgrep 13 have been compiled
using this configuration.

BREAKING CHANGES:

Binary detection output has changed slightly.

In this release, a small tweak has been made to the output format when a binary
file is detected. Previously, it looked like this:

Binary file FOO matches (found "\0" byte around offset XXX)

Now it looks like this:

FOO: binary file matches (found "\0" byte around offset XXX)

vimgrep output in multi-line now only prints the first line for each match.

See issue 1866 for more
discussion on this. Previously, every line in a match was duplicated, even
when it spanned multiple lines. There are no changes to vimgrep output when
multi-line mode is disabled.

In multi-line mode, --count is now equivalent to --count-matches.

This appears to match how pcre2grep implements --count. Previously, ripgrep
would produce outright incorrect counts. Another alternative would be to simply
count the number of lines---even if it's more than the number of matches---but
that seems highly unintuitive.

FULL LIST OF FIXES AND IMPROVEMENTS:

Security fixes:

  • CVE-2021-3013:
    Fixes a security hole on Windows where running ripgrep with either the
    -z/--search-zip or --pre flags can result in running arbitrary
    executables from the current directory.
  • VULN #1773:
    This is the public facing issue tracking CVE-2021-3013. ripgrep's README
    now contains a section describing how to report a vulnerability.

Performance improvements:

  • PERF #1657:
    Check if a file should be ignored first before issuing stat calls.
  • PERF memchr#82:
    ripgrep now uses a new vectorized implementation of memmem.

Feature enhancements:

  • Added or improved file type filtering for ASP, Bazel, dvc, FlatBuffers,
    Futhark, minified files, Mint, pofiles (from GNU gettext) Racket, Red, Ruby,
    VCL, Yang.
  • FEATURE #1404:
    ripgrep now prints a warning if nothing is searched.
  • FEATURE #1613:
    Cargo will now produce static executables on Windows when using MSVC.
  • FEATURE #1680:
    Add -. as a short flag alias for --hidden.
  • FEATURE #1842:
    Add --field-{context,match}-separator for customizing field delimiters.
  • FEATURE #1856:
    The README now links to a
    Spanish translation.

Bug fixes:

  • BUG #1277:
    Document cygwin path translation behavior in the FAQ.
  • BUG #1739:
    Fix bug where replacements were buggy if the regex matched a line terminator.
  • BUG #1311:
    Fix multi-line bug where a search & replace for \n didn't work as expected.
  • BUG #1401:
    Fix buggy interaction between PCRE2 look-around and -o/--only-matching.
  • BUG #1412:
    Fix multi-line bug with searches using look-around past matching lines.
  • BUG #1577:
    Fish shell completions will continue to be auto-generated.
  • BUG #1642:
    Fixes a bug where using -m and -A printed more matches than the limit.
  • BUG #1703:
    Clarify the function of -u/--unrestricted.
  • BUG #1708:
    Clarify how -S/--smart-case works.
  • BUG #1730:
    Clarify that CLI invocation must always be valid, regardless of config file.
  • BUG #1741:
    Fix stdin detection when using PowerShell in UNIX environments.
  • BUG #1756:
    Fix bug where foo/** would match foo, but it shouldn't.
  • BUG #1765:
    Fix panic when --crlf is used in some cases.
  • BUG #1638:
    Correctly sniff UTF-8 and do transcoding, like we do for UTF-16.
  • BUG #1816:
    Add documentation for glob alternate syntax, e.g., {a,b,..}.
  • BUG #1847:
    Clarify how the --hidden flag works.
  • BUG #1866:
    Fix bug when computing column numbers in --vimgrep mode.
  • BUG #1868:
    Fix bug where --passthru and -A/-B/-C did not override each other.
  • BUG #1869:
    Clarify docs for --files-with-matches and --files-without-match.
  • BUG #1878:
    Fix bug where \A could produce unanchored matches in multiline search.
  • BUG 94e4b8e3:
    Fix column numbers with --vimgrep is used with -U/--multiline.

12.1.1

29 May 13:27
12.1.1
7cb2113
Compare
Choose a tag to compare

ripgrep 12.1.1 is a patch release that fixes a couple small bugs. In
particular, the ripgrep 12.1.0 release did not tag new releases for all of its
in-tree dependencies. As a result, ripgrep built dependencies from crates.io
would produce a different build than compiling ripgrep from source on the
12.1.0 tag. Namely, some crates like grep-cli had unreleased changes.

In case you haven't heard of it before, ripgrep is a line-oriented search
tool that recursively searches your current directory for a regex pattern.
By default, ripgrep will respect your gitignore rules and automatically skip
hidden files/directories and binary files.

Bug fixes:

  • BUG #1581:
    Corrects some egregious markup output in --help.
  • BUG #1591:
    Mention the special $0 capture group in docs for the -r/--replace flag.
  • BUG #1602:
    Fix failing test resulting from out-of-sync dependencies.

12.1.0

09 May 15:27
12.1.0
2658bd4
Compare
Choose a tag to compare

ripgrep 12.1.0 is a small minor version release that mostly includes bug fixes
and documentation improvements. This release also contains some important
notices for downstream packagers.

In case you haven't heard of it before, ripgrep is a line-oriented search
tool that recursively searches your current directory for a regex pattern. By
default, ripgrep will respect your .gitignore and automatically skip hidden
files/directories and binary files.

Notices for downstream ripgrep package maintainers:

  • Fish shell completions will be removed in the ripgrep 13 release.
    See #1577
    for more details.
  • ripgrep has switched from a2x to asciidoctor to generate the man page.
    If asciidoctor is not present, then ripgrep will currently fall back to
    a2x. Support for a2x will be dropped in the ripgrep 13 release.
    See #1544
    for more details.

Feature enhancements:

Bug fixes:

  • BUG #1252:
    Add a section on the --pre flag to the GUIDE.
  • BUG #1339:
    Improve error message when a pattern with invalid UTF-8 is provided.
  • BUG #1524:
    Note how to escape a $ when using --replace.
  • BUG #1537:
    Fix match bug caused by inner literal optimization.
  • BUG #1544:
    ripgrep now uses asciidoctor instead of a2x to generate its man page.
  • BUG #1550:
    Substantially reduce peak memory usage when searching wide directories.
  • BUG #1571:
    Add note about configuration files in --type-{add,clear} docs.
  • BUG #1573:
    Fix incorrect --count-matches output when using look-around.

12.0.1

29 Mar 23:00
12.0.1
1d5b101
Compare
Choose a tag to compare

ripgrep 12.0.1 is a small patch release that includes a minor bug fix relating
to superfluous error messages when searching git repositories with sub-modules.
This was a regression introduced in the 12.0.0 release.

In case you haven't heard of it before, ripgrep is a line-oriented search
tool that recursively searches your current directory for a regex pattern. By
default, ripgrep will respect your .gitignore and automatically skip hidden
files/directories and binary files.

Bug fixes:

  • BUG #1520:
    Don't emit spurious error messages in git repositories with submodules.

12.0.0

16 Mar 01:57
12.0.0
b9cd95f
Compare
Choose a tag to compare

ripgrep 12 is a new major version release of ripgrep that contains many bug
fixes, several important performance improvements and a few minor new features.

In case you haven't heard of it before, ripgrep is a line-oriented search
tool that recursively searches your current directory for a regex pattern. By
default, ripgrep will respect your .gitignore and automatically skip hidden
files/directories and binary files.

In a near future release, I am hoping to add an
indexing feature
to ripgrep, which will dramatically speed up searching by building an index.
Feedback would very much be appreciated, especially on the user experience
which will be difficult to get right.

This release has no known breaking changes.

Deprecations:

  • The --no-pcre2-unicode flag is deprecated. Instead, use the --no-unicode
    flag, which applies to both the default regex engine and PCRE2. For now,
    --no-pcre2-unicode and --pcre2-unicode are aliases to --no-unicode
    and --unicode, respectively. The --[no-]pcre2-unicode flags may be
    removed in a future release.
  • The --auto-hybrid-regex flag is deprecated. Instead, use the new --engine
    flag with the auto value.

Performance improvements:

  • PERF #1087:
    ripgrep is smarter when detected literals are whitespace.
  • PERF #1381:
    Directory traversal is sped up with speculative ignore-file existence checks.
  • PERF cd8ec38a:
    Improve inner literal detection to cover more cases more effectively.
    e.g., +Sherlock Holmes + now has Sherlock Holmes extracted instead
    of .
  • PERF 6a0e0147:
    Improve literal detection when the -w/--word-regexp flag is used.
  • PERF ad97e9c9:
    Improve overall performance of the -w/--word-regexp flag.

Feature enhancements:

  • Added or improved file type filtering for erb, diff, Gradle, HAML, Org,
    Postscript, Skim, Slim, Slime, RPM Spec files, Typoscript, xml.
  • FEATURE #1370:
    Add --include-zero flag that shows files searched without matches.
  • FEATURE #1390:
    Add --no-context-separator flag that always hides context separators.
  • FEATURE #1414:
    Add --no-require-git flag to allow ripgrep to respect gitignores anywhere.
  • FEATURE #1420:
    Add --no-ignore-exclude to disregard rules in .git/info/exclude files.
  • FEATURE #1466:
    Add --no-ignore-files flag to disable all --ignore-file flags.
  • FEATURE #1488:
    Add '--engine' flag for easier switching between regex engines.
  • FEATURE 75cbe88f:
    Add --no-unicode flag. This works on all supported regex engines.

Bug fixes:

  • BUG #1291:
    ripgrep now works in non-existent directories.
  • BUG #1319:
    Fix match bug due to errant literal detection.
  • BUG #1335:
    Fixes a performance bug when searching plain text files with very long lines.
    This was a serious performance regression in some cases.
  • BUG #1344:
    Document usage of --type all.
  • BUG #1389:
    Fixes a bug where ripgrep would panic when searching a symlinked directory.
  • BUG #1439:
    Improve documentation for ripgrep's automatic stdin detection.
  • BUG #1441:
    Remove CPU features from man page.
  • BUG #1442,
    BUG #1478:
    Improve documentation of the -g/--glob flag.
  • BUG #1445:
    ripgrep now respects ignore rules from .git/info/exclude in worktrees.
  • BUG #1485:
    Fish shell completions from the release Debian package are now installed to
    /usr/share/fish/vendor_completions.d/rg.fish.