ripgrep recursively searches directories for a regex pattern while respecting your gitignore
ripgrep 11.0.2 is a new patch release that fixes a few bugs, including a
performance regression and a matching bug when using the -F/--fixed-strings
flag.
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.
Feature enhancements:
--glob-case-insensitive
flag that makes --glob
behave as --iglob
.Bug fixes:
-f file
was stripped if it wasn't a \n
.\n
with -P/--pcre2
..ignore
and .rgignore
more prominently in the README.--with-filename
was sometimes enabled incorrectly.x86_64-linux
binary release.-F
flag when patterns contain meta characters.ripgrep 11.0.1 is a new patch release that fixes a search regression introduced in the previous 11.0.0 release. In particular, ripgrep can enter an infinite loop for some search patterns when searching invalid UTF-8.
Bug fixes:
ripgrep 11 is a new major version release of ripgrep that contains many bug fixes, some performance improvements and a few feature enhancements. Notably, ripgrep's user experience for binary file filtering has been improved. See the guide's new section on binary data for more details.
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.
This release also marks a change in ripgrep's versioning. Where as the previous
version was 0.10.0
, this version is 11.0.0
. Moving forward, ripgrep's
major version will be increased a few times per year. ripgrep will continue to
be conservative with respect to backwards compatibility, but may occasionally
introduce breaking changes, which will always be documented in this CHANGELOG.
See issue 1172 for a bit
more detail on why this versioning change was made.
This release increases the minimum supported Rust version from 1.28.0 to 1.34.0.
BREAKING CHANGES:
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.-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
.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:
Feature enhancements:
--binary
flag for disabling binary file filtering.--max-columns-preview
flag for showing a preview of long lines.-z/--search-zip
flag.--no-ignore-dot
flag for ignoring .ignore
files.--auto-hybrid-regex
flag for automatically falling back to PCRE2.--ignore-file-case-insensitive
for case insensitive ignore globs.-I
flag as a short option for the --no-filename
flag.none
value to -E/--encoding
to forcefully disable all transcoding.--pcre2-version
for querying showing PCRE2 version information.Bug fixes:
**
is now accepted as valid syntax anywhere in a glob./proc
with a zombie process present.-U/--multiline
when a pattern contains a \n
.--crlf
flag.--encoding auto
does.--files-with-matches
and --files-without-match
work with one file.--files
flag.rg -h | rg
and should emit correct exit status.**
patterns in gitignore files.**
patterns in gitignore files.-F
/-x
weren't applied to patterns given via -f
.ripgrep is a line-oriented search tool that recursively searches your current directory for a regex pattern while respecting your gitignore rules. ripgrep has first class support on Windows, macOS and Linux, with binary downloads available for every release. ripgrep is similar to other popular search tools like The Silver Searcher, ack and grep.
This is a new minor version release of ripgrep that contains some major new features, a huge number of bug fixes, and is the first release based on libripgrep. The entirety of ripgrep's core search and printing code has been rewritten and generalized so that anyone can make use of it.
Major new features include PCRE2 support, multi-line search and a JSON output format.
BREAKING CHANGES:
-w/--word-regexp
have changed slightly. They used
to be \b(?:<your pattern>)\b
, but now it's
(?:^|\W)(?:<your pattern>)(?:$|\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:
grep
.-U/--multiline
flag that permits matching over multiple lines.-P/--pcre2
flag that gives support for look-around and backreferences.--json
flag that prints results in a JSON Lines format.--one-file-system
flag to skip directories on different file systems.--sort
and --sortr
flag for more sorting. Deprecate --sort-files
.--crlf
flag to permit $
to work with carriage returns on Windows.--trim
flag strips prefix whitespace from all lines printed.--null-data
flag, which makes ripgrep use NUL as a line terminator.--passthru
flag now works with the --replace
flag.--line-buffered
and --block-buffered
for forcing a buffer strategy.--pre-glob
for filtering files through the --pre
flag.Bug fixes:
-w/--word-regexp
flag now works more intuitively.--passthru
flag should not impact process exit status.ignore
crate where first path was always treated as a symlink.--version
output.-f
in zsh.This is a new minor version release of ripgrep that contains some minor new features and a panoply of bug fixes.
Releases provided on Github for x86_64
will now work on all target CPUs, and
will also automatically take advantage of features found on modern CPUs (such
as AVX2) for additional optimizations.
This release increases the minimum supported Rust version from 1.20.0 to 1.23.0.
It is anticipated that the next release of ripgrep (0.10.0) will provide multi-line search support and a JSON output format.
BREAKING CHANGES:
--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.)\1
as syntax for matching U+0001
, but ripgrep will now report an
error instead.--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:
--stats
flag, which emits aggregate statistics after search results.--no-ignore-messages
flag, which suppresses parse errors from reading
.ignore
and .gitignore
files.\u{..}
Unicode escape sequences.-b/--byte-offset
flag that shows the byte offset of each matching line.--count-matches
flag, which is like --count
, but for each match.--no-column
flag, which disables column numbers in the output.lz4
when using the -z/--search-zip
flag.termcolor
has moved to its own repository:
https://github.com/BurntSushi/termcolor
--no-ignore-global
, that permits disabling global
gitignores.--maxdepth
to --max-depth
for consistency. Keep --maxdepth
for
backwards compatibility.--pre
option to filter inputs with an arbitrary program.Bug fixes:
\s*{
.--line-number-width
by removing it.-f/--file
flag.-S/--smart-case
detection once and for all.ENOMEM
errors returned by mmap
.grep
crate to regex-syntax 0.6.0
.--quiet --files
is used.-z/--search-zip
is used.--path separator /
in some Windows
shells.--no-fixed-strings
flag to disable -F/--fixed-strings
.ignore
crate that prevented the use of explicit ignore
files after disabling all other ignore rules.$XDG_CONFIG_DIR/git/config
for detecting core.excludesFile
.This is a patch release of ripgrep that primarily fixes regressions introduced in 0.8.0 (#820 and #824) in directory traversal on Windows. These regressions do not impact non-Windows users.
Feature enhancements:
underline
support to termcolor
and ripgrep. See documentation on the
--colors
flag for details.Bug fixes:
--ignore-file
flag.(rev )
if the revision wasn't available during the build.termcolor
.ignore
crate for custom ignore files. This had no impact
on ripgrep.rg --hidden .
behaved differently from rg --hidden ./
.This is a new minor version releae of ripgrep that satisfies several popular feature requests (config files, search compressed files, true colors), fixes many bugs and improves the quality of life for ripgrep maintainers. This release also includes greatly improved documentation in the form of a User Guide and a FAQ.
This release increases the minimum supported Rust version from 1.17 to 1.20.
BREAKING CHANGES:
Note that these are all very minor and unlikely to impact most users.
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.-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.[^...]
is now equivalent to [!...]
(indicating class
negation). Previously, ^
had no special significance in a character class.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:
-z/--search-zip
flag.--line-number-width
flag..rgignore
files. (A higher precedent, application specific
version of .ignore
.)-F/--fixed-strings
flag on a regex syntax error.--passthru
flag that causes ripgrep to print every line it reads.--no-text
).Bug fixes:
!**/
in .gitignore
.[^...]
glob syntax (as identical to [!...]
).--smart-case
uppercase character detection.\x1B[0m
instead of \x1B[m
.yarn.lock
from YAML file type./sys/devices/system/cpu/vulnerabilities/*
files./
.--max-columns=0
now disables the limit.--files-without-match
.Maintenance fixes:
env_logger
in favor of simpler logger to avoid many new dependencies.unsafe
in globset
. :tada:compile
script.Friends of ripgrep:
I'd like to extend my gratitude to @balajisivaraman for their recent hard work in a number of areas, and in particular, for implementing the "search compressed files" feature. Their work in sketching out a specification for that and other work has been exemplary.
Thanks @balajisivaraman!
This is a patch release of ripgrep that includes a fix to very bad regression introduced in ripgrep 0.7.0.
Bug fixes:
This is a new minor version release of ripgrep that includes mostly bug fixes.
ripgrep continues to require Rust 1.17, and there are no known breaking changes introduced in this release.
Feature enhancements:
-o/--only-matching
and -r/--replace
does the right thing.Bug fixes:
-m/--max-count
flag is used.-r/--replace
and terminal colors.This is a new minor version release of ripgrep that includes many bug fixes
and a few new features such as --iglob
and -x/--line-regexp
.
Note that this release increases the minimum supported Rust version from 1.12 to 1.17.
Feature enhancements:
--iglob
flag that is like -g/--glob
, but matches globs
case insensitively.-x/--line-regexp
flag, which requires a match to span an entire line.ignore
: add new matched_path_or_any_parents
method.Bug fixes:
strip
'd by default. This decreases
binary size by an order of magnitude.--quiet
is passed, --files
should be quiet.--vimgrep
is passed, --with-filename
should be enabled
automatically.-o/--only-matching
flag.wincolor
: Re-fetch Windows console on all calls.--version
now shows enabled compile-time features.encoding_rs
when appropriate.-w/--word-regexp
in the presence of capturing groups.Friends of ripgrep:
I'd like to give a big Thank You to @okdana for their recent hard work on
ripgrep. This includes new features like --line-regexp
, heroic effort on
zsh auto-completion and thinking through some thorny argv issues with me.
I'd also like to thank @ericbn for their work on improving ripgrep's argv parsing by allowing some flags to override others.
Thanks @okdana and @ericbn!