ripgrep 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:
Make
rg -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 on
aarch64. - 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:
Add
italicto 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:
Add
aarch64release artifacts for Windows. - FEATURE #3024:
Add
highlightcolor type, for styling non-matching text in a matching line. - FEATURE #3048:
Globs in ripgrep (and the
globsetcrate) now support nested alternates. - FEATURE #3096:
Improve completions for
--hyperlink-formatin bash and fish. - FEATURE #3102:
Improve completions for
--hyperlink-formatin zsh.