Releases: BurntSushi/ripgrep
15.1.0
This is a small release that fixes a bug with how ripgrep handles line
buffering. This might manifest as ripgrep printing output later than you
expect or not working correctly with tail -f (even if you're using the
--line-buffered flag).
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 #3194:
Fix a regression with--line-bufferedintroduced in ripgrep 15.0.0.
Feature enhancements:
- FEATURE #3192:
Add hyperlink alias for Cursor.
15.0.0
ripgrep 15 is a new major version release of ripgrep that mostly has bug fixes,
some minor performance improvements and minor new features.
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.
Here are some highlights:
- Several bugs around gitignore matching have been fixed. This includes
a commonly reported bug related to applying gitignore rules from parent
directories. - A memory usage regression when handling very large gitignore files has been
fixed. rg -vf file, wherefileis empty, now matches everything.- The
-r/--replaceflag now works with--json. - A subset of Jujutsu (
jj) repositories are now treated as if they were git
repositories. That is, ripgrep will respectjj's gitignores. - Globs can now use nested curly braces.
Platform support:
aarch64for Windows now has release artifacts.powerpc64no longer has release artifacts generated for it. The CI
release workflow stopped working, and I didn't deem it worth my time to
debug it. If someone wants this and can test it, I'd be happy to add it
back.- ripgrep binaries are now compiled with full LTO enabled. You may notice
small performance improvements from this and a modest decrease in binary
size.
Performance improvements:
- PERF #2111:
Don't resolve helper binaries on Windows when-z/--search-zipisn't used. - PERF #2865:
Avoid using path canonicalization on Windows when emitting hyperlinks. - PERF #3184:
Improve performance of large values with-A/--after-context.
Bug fixes:
- BUG #829,
BUG #2731,
BUG #2747,
BUG #2770,
BUG #2778,
BUG #2836,
BUG #2933,
BUG #3067:
Fix bug related to gitignores from parent directories. - BUG #1332,
BUG #3001:
Makerg -vf filewherefileis empty match everything. - BUG #2177:
Ignore a UTF-8 BOM marker at the start of.gitignore(and similar files). - BUG #2750:
Fix memory usage regression for some truly large gitignore files. - BUG #2944:
Fix a bug where the "bytes searched" in--statsoutput could be incorrect. - BUG #2990:
Fix a bug where ripgrep would mishandle globs that ended with a.. - BUG #2094,
BUG #3076:
Fix bug with-m/--max-countand-U/--multilineshowing too many matches. - BUG #3100:
Preserve line terminators when using-r/--replaceflag. - BUG #3108:
Fix a bug where-q --files-without-matchinverted the exit code. - BUG #3131:
Document inconsistency between-c/--countand--files-with-matches. - BUG #3135:
Fix rare panic for some classes of large regexes on large haystacks. - BUG #3140:
Ensure hyphens in flag names are escaped in the roff text for the man page. - BUG #3155:
Statically compile PCRE2 into macOS release artifacts onaarch64. - BUG #3173:
Fix ancestor ignore filter bug when searching whitelisted hidden files. - BUG #3178:
Fix bug causing incorrect summary statistics with--jsonflag. - BUG #3179:
Fix gitignore bug when searching absolute paths with global gitignores. - BUG #3180:
Fix a panicking bug when using-U/--multilineand-r/--replace.
Feature enhancements:
- Many enhancements to the default set of file types available for filtering.
- FEATURE #1872:
Make-r/--replacework with--json. - FEATURE #2708:
Completions for the fish shell take ripgrep's config file into account. - FEATURE #2841:
Additalicto the list of available style attributes in--color. - FEATURE #2842:
Directories containing.jjare now treated as git repositories. - FEATURE #2849:
When using multithreading, schedule files to search in order given on CLI. - FEATURE #2943:
Addaarch64release artifacts for Windows. - FEATURE #3024:
Addhighlightcolor type, for styling non-matching text in a matching line. - FEATURE #3048:
Globs in ripgrep (and theglobsetcrate) now support nested alternates. - FEATURE #3096:
Improve completions for--hyperlink-formatin bash and fish. - FEATURE #3102:
Improve completions for--hyperlink-formatin zsh.
14.1.1
This is a minor release with a bug fix for a matching bug. In particular, a bug
was found that could cause ripgrep to ignore lines that should match. That is,
false negatives. It is difficult to characterize the specific set of regexes
in which this occurs as it requires multiple different optimization strategies
to collide and produce an incorrect result. But as one reported example, in
ripgrep, the regex (?i:e.x|ex) does not match e-x when it should. (This
bug is a result of an inner literal optimization performed in the grep-regex
crate and not in the regex crate.)
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 #2884:
Fix bug where ripgrep could miss some matches that it should report.
Miscellaneous:
- MISC #2748:
Remove ripgrep'ssimd-accelfeature because it was frequently broken.
14.1.0
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 theignorecrate.
Feature enhancements:
- Added or improved file type filtering for Lean and Meson.
- FEATURE #2684:
Improve completions for thefishshell. - FEATURE #2702:
Add release binaries forarmv7-unknown-linux-gnueabihf,
armv7-unknown-linux-musleabihfandarmv7-unknown-linux-musleabi.
14.0.3
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 atodo!()in the source. Oof.
14.0.2
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:
14.0.1
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:
Includepkg/windows/Manifest.xmlin crate package.
14.0.0
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 -A2used to be equivalent torg -A2, but now it is equivalent to
rg -B1 -A2. That is,-Aand-Bno 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--generateflag. For example,rg --generate manwill write a
man page inroffformat on stdout. The release archives have not changed. - The optional build dependency on
asciidocorasciidoctorhas been
dropped. Previously, it was used to produce ripgrep's man page. ripgrep now
owns this process itself by writingroffdirectly.
Performance improvements:
- PERF #1746:
Make some cases with inner literals faster. - PERF #1760:
Make most searches with\blook-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-formatflag 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-nonmatchflag. - FEATURE #1814:
Flags are now categorized in-h/--helpoutput and ripgrep's man page. - FEATURE #1838:
An error is shown when searching for NUL bytes with binary detection enabled. - FEATURE #2195:
Whenextra-verbosemode is enabled in zsh, show extra file type info. - FEATURE #2298:
Add instructions for installing ripgrep usingcargo binstall. - FEATURE #2409:
Added installation instructions forwinget. - FEATURE #2425:
Shell completions (and man page) can be created viarg --generate. - FEATURE #2524:
The--debugflag now indicates whether stdin or./is being searched. - FEATURE #2643:
Make-da short flag for--max-depth. - FEATURE #2645:
The--versionoutput will now also contain PCRE2 availability information.
Bug fixes:
- BUG #884:
Don't error when-v/--invert-matchis used multiple times. - BUG #1275:
Fix bug with\bassertion in the regex engine. - BUG #1376:
Using--no-ignore --ignore-vcsnow works as one would expect. - BUG #1622:
Add note about error messages to-z/--search-zipdocumentation. - 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-wwith 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--precan accept any kind of path in the documentation. - BUG #2108:
Improve docs for-r/--replacesyntax. - BUG #2198:
Fix bug where--no-ignore-dotwould not ignore.rgignore. - BUG #2201:
Improve docs for-r/--replaceflag. - BUG #2288:
-Aand-Bnow only each partially override-C. - BUG #2236:
Fix gitignore parsing bug where a trailing\/resulted in an error. - BUG #2243:
Fix--sortflag for values other thanpath. - BUG #2246:
Add note in--debuglogs when binary files are ignored. - BUG #2337:
Improve docs to mention that--statsis always implied by--json. - BUG #2381:
Make-p/--prettyoverride flags like--no-line-number. - BUG #2392:
Improve global git config parsing of theexcludesFilefield. - BUG #2418:
Clarify sorting semantics of--sort=path. - BUG #2458:
Make--trimrun before-M/--max-columnstakes effect. - BUG #2479:
Add documentation about.ignore/.rgignorefiles in parent directories. - BUG #2480:
Fix bug when using inline regex flags with-e/--regexp. - BUG #2505:
Improve docs for--vimgrepby mentioning footguns and some work-arounds. - BUG #2519:
Fix incorrect default value in documentation for--field-match-separator. - BUG #2523:
Make executable searching take.cominto account on Windows. - BUG #2574:
Fix bug in-w/--word-regexpthat would result in incorrect match offsets. - BUG #2623:
Fix a number of bugs with the-w/--word-regexpflag. - BUG #2636:
Strip release binaries for macOS.
13.0.0
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-zipor--preflags 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 ofmemmem.
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}-separatorfor 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\ndidn'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-mand-Aprinted more matches than the limit. - BUG #1703:
Clarify the function of-u/--unrestricted. - BUG #1708:
Clarify how-S/--smart-caseworks. - 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 wherefoo/**would matchfoo, but it shouldn't. - BUG #1765:
Fix panic when--crlfis 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--hiddenflag works. - BUG #1866:
Fix bug when computing column numbers in--vimgrepmode. - BUG #1868:
Fix bug where--passthruand-A/-B/-Cdid not override each other. - BUG #1869:
Clarify docs for--files-with-matchesand--files-without-match. - BUG #1878:
Fix bug where\Acould produce unanchored matches in multiline search. - BUG 94e4b8e3:
Fix column numbers with--vimgrepis used with-U/--multiline.
12.1.1
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: