ail -f something.log | rg foo --line-buffered | rg bar'.

Forceful line buffering can be disabled with --no-line-buffered. Note that
using --no-line-buffered causes ripgrep to revert to its default behavior of
automatically detecting the buffering strategy. To force block buffering, use
the --block-buffered flag.
 line-numbernShow line numbers.Show line numbers (1-based). This is enabled by default when searching in a
terminal.
 no-line-numberNSuppress line numbers.Suppress line numbers. This is enabled by default when not searching in a
terminal.
 line-regexpxOnly show matches surrounded by line boundaries.Only show matches surrounded by line boundaries. This is equivalent to putting
^...$ around all of the search patterns. In other words, this only prints lines
where the entire line participates in a match.

This overrides the --word-regexp flag.
 word-regexpmax-columnsMDon't print lines longer than this limit.Don't print lines longer than this limit in bytes. Longer lines are omitted,
and only the number of matches in that line is printed.

When this flag is omitted or is set to 0, then it has no effect.
 max-columns-previewPrint a preview for lines exceeding the limit.When the '--max-columns' flag is used, ripgrep will by default completely
replace any line that is too long with a message indicating that a matching
line was removed. When this flag is combined with '--max-columns', a preview
of the line (corresponding to the limit size) is shown instead, where the part
of the line exceeding the limit is not shown.

If the '--max-columns' flag is not set, then this has no effect.

This flag can be disabled with '--no-max-columns-preview'.
 no-max-columns-previewmax-countmLimit the number of matches.Limit the number of matching lines per file searched to NUM.
 max-depthDescend at most NUM directories.Limit the depth of directory traversal to NUM levels beyond the paths given. A
value of zero only searches the explicitly given paths themselves.

For example, 'rg --max-depth 0 dir/' is a no-op because dir/ will not be
descended into. 'rg --max-depth 1 dir/' will search only the direct children of
'dir'.
 maxdepthmax-filesizeIgnore files larger than NUM in size.Ignore files larger than NUM in size. This does not apply to directories.

The input format accepts suffixes of K, M or G which correspond to kilobytes,
megabytes and gigabytes, respectively. If no suffix is provided the input is
treated as bytes.

Examples: --max-filesize 50K or --max-filesize 80M
 mmapSearch using memory maps when possible.Search using memory maps when possible. This is enabled by default when ripgrep
thinks it will be faster.

Memory map searching doesn't currently support all options, so if an
incompatible option (e.g., --context) is given with --mmap, then memory maps
will not be used.

Note that ripgrep may abort unexpectedly when --mmap if it searches a file that
is simultaneously truncated.

This flag overrides --no-mmap.
 no-mmapNever use memory maps.Never use memory maps, even when they might be faster.

This flag overrides --mmap.
 multilineUEnable matching across multiple lines.Enable matching across multiple lines.

When multiline mode is enabled, ripgrep will lift the restriction that a match
cannot include a line terminator. For example, when multiline mode is not
enabled (the default), then the regex '\p{any}' will match any Unicode
codepoint other than '\n'. Similarly, the regex '\n' is explicitly forbidden,
and if you try to use it, ripgrep will return an error. However, when multiline
mode is enabled, '\p{any}' will match any Unicode codepoint, including '\n',
and regexes like '\n' are permitted.

An important caveat is that multiline mode does not change the match semantics
of '.'. Namely, in most regex matchers, a '.' will by default match any
character other than '\n', and this is true in ripgrep as well. In order to
make '.' match '\n', you must enable the "dot all" flag inside the regex.
For example, both '(?s).' and '(?s:.)' have the same semantics, where '.' will
match any character, including '\n'. Alternatively, the '--multiline-dotall'
flag may be passed to make the "dot all" behavior the default. This flag only
applies when multiline search is enabled.

There is no limit on the number of the lines that a single match can span.

**WARNING**: Because of how the underlying regex engine works, multiline
searches may be slower than normal line-oriented searches, and they may also
use more memory. In particular, when multiline mode is enabled, ripgrep
requires that each file it searches is laid out contiguously in memory
(either by reading it onto the heap or by memory-mapping it). Things that
cannot be memory-mapped (such as stdin) will be consumed until EOF before
searching can begin. In general, ripgrep will only do these things when
necessary. Specifically, if the --multiline flag is provided but the regex
does not contain patterns that would match '\n' characters, then ripgrep
will automatically avoid reading each file into memory before searching it.
Nevertheless, if you only care about matches spanning at most one line, then it
is always better to disable multiline mode.

This flag can be disabled with --no-multiline.
 no-multilinemultiline-dotallMake '.' match new lines when multiline is enabled.This flag enables "dot all" in your regex pattern, which causes '.' to match
newlines when multiline searching is enabled. This flag has no effect if
multiline searching isn't enabled with the --multiline flag.

Normally, a '.' will match any character except newlines. While this behavior
typically isn't relevant for line-oriented matching (since matches can span at
most one line), this can be useful when searching with the -U/--multiline flag.
By default, the multiline mode runs without this flag.

This flag is generally intended to be used in an alias or your ripgrep config
file if you prefer "dot all" semantics by default. Note that regardless of
whether this flag is used, "dot all" semantics can still be controlled via
inline flags in the regex pattern itself, e.g., '(?s:.)' always enables "dot
all" whereas '(?-s:.)' always disables "dot all".

This flag can be disabled with --no-multiline-dotall.
 no-multiline-dotallno-configNever read configuration files.Never read configuration files. When this flag is present, ripgrep will not
respect the RIPGREP_CONFIG_PATH environment variable.

If ripgrep ever grows a feature to automatically read configuration files in
pre-defined locations, then this flag will also disable that behavior as well.
 no-ignoreDon't respect ignore files.Don't respect ignore files (.gitignore, .ignore, etc.). This implies
--no-ignore-dot, --no-ignore-exclude, --no-ignore-global, no-ignore-parent and
--no-ignore-vcs.

This does *not* imply --no-ignore-files, since --ignore-file is specified
explicitly as a command line argument.

When given only once, the -u flag is identical in behavior to --no-ignore and
can be considered an alias. However, subsequent -u flags have additional
effects; see --unrestricted.

This flag can be disabled with the --ignore flag.
 ignoreno-ignore-dotDon't respect .ignore files.Don't respect .ignore files.

This does *not* affect whether ripgrep will ignore files and directories
whose names begin with a dot. For that, see the -./--hidden flag.

This flag can be disabled with the --ignore-dot flag.
 ignore-dotno-ignore-excludeDon't respect local exclusion files.Don't respect ignore files that are manually configured for the repository
such as git's '.git/info/exclude'.

This flag can be disabled with the --ignore-exclude flag.
 ignore-excludeno-ignore-filesDon't respect --ignore-file arguments.When set, any --ignore-file flags, even ones that come after this flag, are
ignored.

This flag can be disabled with the --ignore-files flag.
 ignore-filesno-ignore-globalDon't respect global ignore files.Don't respect ignore files that come from "global" sources such as git's
`core.excludesFile` configuration option (which defaults to
`$HOME/.config/git/ignore`).

This flag can be disabled with the --ignore-global flag.
 ignore-globalno-ignore-messagesSuppress gitignore parse error messages.Suppresses all error messages related to parsing ignore files such as .ignore
or .gitignore.

This flag can be disabled with the --ignore-messages flag.
 ignore-messagesno-ignore-parentDon't respect ignore files in parent directories.Don't respect ignore files (.gitignore, .ignore, etc.) in parent directories.

This flag can be disabled with the --ignore-parent flag.
 ignore-parentno-ignore-vcsDon't respect VCS ignore files.Don't respect version control ignore files (.gitignore, etc.). This implies
--no-ignore-parent for VCS files. Note that .ignore files will continue to be
respected.

This flag can be disabled with the --ignore-vcs flag.
 ignore-vcsno-messagesSuppress some error messages.Suppress all error messages related to opening and reading files. Error
messages related to the syntax of the pattern given are still shown.

This flag can be disabled with the --messages flag.
 messagesno-pcre2-unicodeDisable Unicode mode for PCRE2 matching.DEPRECATED. Use --no-unicode instead.

This flag is now an alias for --no-unicode. And --pcre2-unicode is an alias
for --unicode.
 pcre2-unicodeunicodeno-unicodeno-require-gitDo not require a git repository to use gitignores.By default, ripgrep will only respect global gitignore rules, .gitignore rules
and local exclude rules if ripgrep detects that you are searching inside a
git repository. This flag allows you to relax this restriction such that
ripgrep will respect all git related ignore rules regardless of whether you're
searching in a git repository or not.

This flag can be disabled with --require-git.
 require-gitDisable Unicode mode.By default, ripgrep will enable "Unicode mode" in all of its regexes. This
has a number of consequences:

* '.' will only match valid UTF-8 encoded scalar values.
* Classes like '\w', '\s', '\d' are all Unicode aware and much bigger
  than their ASCII only versions.
* Case insensitive matching will use Unicode case folding.
* A large array of classes like '\p{Emoji}' are available.
* Word boundaries ('\b' and '\B') use the Unicode definition of a word
  character.

In some cases it can be desirable to turn these things off. The --no-unicode
flag will do exactly that.

For PCRE2 specifically, Unicode mode represents a critical trade off in the
user experience of ripgrep. In particular, unlike the default regex engine,
PCRE2 does not support the ability to search possibly invalid UTF-8 with
Unicode features enabled. Instead, PCRE2 *requires* that everything it searches
when Unicode mode is enabled is valid UTF-8. (Or valid UTF-16/UTF-32, but for
the purposes of ripgrep, we only discuss UTF-8.) This means that if you have
PCRE2's Unicode mode enabled and you attempt to search invalid UTF-8, then
the search for that file will halt and print an error. For this reason, when
PCRE2's Unicode mode is enabled, ripgrep will automatically "fix" invalid
UTF-8 sequences by replacing them with the Unicode replacement codepoint. This
penalty does not occur when using the default regex engine.

If you would rather see the encoding errors surfaced by PCRE2 when Unicode mode
is enabled, then pass the --no-encoding flag to disable all transcoding.

The --no-unicode flag can be disabled with --unicode. Note that
--no-pcre2-unicode and --pcre2-unicode are aliases for --no-unicode and
--unicode, respectively.
 null0Print a NUL byte after file paths.Whenever a file path is printed, follow it with a NUL byte. This includes
printing file paths before matches, and when printing a list of matching files
such as with --count, --files-with-matches and --files. This option is useful
for use with xargs.
 Use NUL as a line terminator instead of \n.Enabling this option causes ripgrep to use NUL as a line terminator instead of
the default of '\n'.

This is useful when searching large binary files that would otherwise have very
long lines if '\n' were used as the line terminator. In particular, ripgrep
requires that, at a minimum, each line must fit into memory. Using NUL instead
can be a useful stopgap to keep memory requirements low and avoid OOM (out of
memory) conditions.

This is also useful for processing NUL delimited data, such as that emitted
when using ripgrep's -0/--null flag or find's --print0 flag.

Using this flag implies -a/--text.
 one-file-systemDo not descend into directories on other file systems.When enabled, ripgrep will not cross file system boundaries relative to where
the search started from.

Note that this applies to each path argument given to ripgrep. For example, in
the command 'rg --one-file-system /foo/bar /quux/baz', ripgrep will search both
'/foo/bar' and '/quux/baz' even if they are on different file systems, but will
not cross a file system boundary when traversing each path's directory tree.

This is similar to find's '-xdev' or '-mount' flag.

This flag can be disabled with --no-one-file-system.
 no-one-file-systemonly-matchingoPrint only matched parts of a line.Print only the matched (non-empty) parts of a matching line, with each such
part on a separate output line.
 path-separatorSet the path separator.Set the path separator to use when printing file paths. This defaults to your
platform's path separator, which is / on Unix and \ on Windows. This flag is
intended for overriding the default when the environment demands it (e.g.,
cygwin). A path separator is limited to a single byte.
 Print both matching and non-matching lines.Print both matching and non-matching lines.

Another way to achieve a similar effect is by modifying your pattern to match
the empty string. For example, if you are searching using 'rg foo' then using
'rg "^|foo"' instead will emit every line in every file searched, but only
occurrences of 'foo' will be highlighted. This flag enables the same behavior
without needing to modify the pattern.

This overrides the --context, --after-context and --before-context flags.
 passthroughPEnable PCRE2 matching.When this flag is present, ripgrep will use the PCRE2 regex engine instead of
its default regex engine.

This is generally useful when you want to use features such as look-around
or backreferences.

Note that PCRE2 is an optional ripgrep feature. If PCRE2 wasn't included in
your build of ripgrep, then using this flag will result in ripgrep printing
an error message and exiting. PCRE2 may also have worse user experience in
some cases, since it has fewer introspection APIs than ripgrep's default regex
engine. For example, if you use a '\n' in a PCRE2 regex without the
'-U/--multiline' flag, then ripgrep will silently fail to match anything
instead of reporting an error immediately (like it does with the default
regex engine).

Related flags: --no-pcre2-unicode

This flag can be disabled with --no-pcre2.
 Print the version of PCRE2 that ripgrep uses.When this flag is present, ripgrep will print the version of PCRE2 in use,
along with other information, and then exit. If PCRE2 is not available, then
ripgrep will print an error message and exit with an error code.
 preCOMMANDsearch outputs of COMMAND FILE for each FILEFor each input FILE, search the standard output of COMMAND FILE rather than the
contents of FILE. This option expects the COMMAND program to either be an
absolute path or to be available in your PATH. Either an empty string COMMAND
or the '--no-pre' flag will disable this behavior.

    WARNING: When this flag is set, ripgrep will unconditionally spawn a
    process for every file that is searched. Therefore, this can incur an
    unnecessarily large performance penalty if you don't otherwise need the
    flexibility offered by this flag. One possible mitigation to this is to use
    the '--pre-glob' flag to limit which files a preprocessor is run with.

A preprocessor is not run when ripgrep is searching stdin.

When searching over sets of files that may require one of several decoders
as preprocessors, COMMAND should be a wrapper program or script which first
classifies FILE based on magic numbers/content or based on the FILE name and
then dispatches to an appropriate preprocessor. Each COMMAND also has its
standard input connected to FILE for convenience.

For example, a shell script for COMMAND might look like:

    case "$1" in
    *.pdf)
        exec pdftotext "$1" -
        ;;
    *)
        case $(file "$1") in
        *Zstandard*)
            exec pzstd -cdq
            ;;
        *)
            exec cat
            ;;
        esac
        ;;
    esac

The above script uses `pdftotext` to convert a PDF file to plain text. For
all other files, the script uses the `file` utility to sniff the type of the
file based on its contents. If it is a compressed file in the Zstandard format,
then `pzstd` is used to decompress the contents to stdout.

This overrides the -z/--search-zip flag.
 no-presearch-zippre-globInclude or exclude files from a preprocessing command.This flag works in conjunction with the --pre flag. Namely, when one or more
--pre-glob flags are given, then only files that match the given set of globs
will be handed to the command specified by the --pre flag. Any non-matching
files will be searched without using the preprocessor command.

This flag is useful when searching many files with the --pre flag. Namely,
it permits the ability to avoid process overhead for files that don't need
preprocessing. For example, given the following shell script, 'pre-pdftotext':

    #!/bin/sh

    pdftotext "$1" -

then it is possible to use '--pre pre-pdftotext --pre-glob '*.pdf'' to make
it so ripgrep only executes the 'pre-pdftotext' command on files with a '.pdf'
extension.

Multiple --pre-glob flags may be used. Globbing rules match .gitignore globs.
Precede a glob with a ! to exclude it.

This flag has no effect if the --pre flag is not used.
 prettypAlias for --color always --heading --line-number.This is a convenience alias for '--color always --heading --line-number'. This
flag is useful when you still want pretty output even if you're piping ripgrep
to another program or file. For example: 'rg -p foo | less -R'.
 quietqDo not print anything to stdout.Do not print anything to stdout. If a match is found in a file, then ripgrep
will stop searching. This is useful when ripgrep is used only for its exit
code (which will be an error if no matches are found).

When --files is used, then ripgrep will stop finding files after finding the
first file that matches all ignore rules.
 regex-size-limitThe upper size limit of the compiled regex.The upper size limit of the compiled regex. The default limit is 10M.

The argument accepts the same size suffixes as allowed in the --max-filesize
flag.
 eA pattern to search for.A pattern to search for. This option can be provided multiple times, where
all patterns given are searched. Lines matching at least one of the provided
patterns are printed. This flag can also be used when searching for patterns
that start with a dash.

For example, to search for the literal '-foo', you can use this flag:

    rg -e -foo

You can also use the special '--' delimiter to indicate that no more flags
will be provided. Namely, the following is equivalent to the above:

    rg -- -foo
 replaceREPLACEMENT_TEXTrReplace matches with the given text.Replace every match with the text given when printing results. Neither this
flag nor any other ripgrep flag will modify your files.

Capture group indices (e.g., $5) and names (e.g., $foo) are supported in the
replacement string. Capture group indices are numbered based on the position of
the opening parenthesis of the group, where the leftmost such group is $1. The
special $0 group corresponds to the entire match.

In shells such as Bash and zsh, you should wrap the pattern in single quotes
instead of double quotes. Otherwise, capture group indices will be replaced by
expanded shell variables which will most likely be empty.

To write a literal '$', use '$$'.

Note that the replacement by default replaces each match, and NOT the entire
line. To replace the entire line, you should match the entire line.

This flag can be used with the -o/--only-matching flag.
 zSearch in compressed files.Search in compressed files. Currently gzip, bzip2, xz, LZ4, LZMA, Brotli and
Zstd files are supported. This option expects the decompression binaries to be
available in your PATH.

This flag can be disabled with --no-search-zip.
 no-search-zipSSmart case search.Searches case insensitively if the pattern is all lowercase. Search case
sensitively otherwise.

A pattern is considered all lowercase if both of the following rules hold:

First, the pattern contains at least one literal character. For example, 'a\w'
contains a literal ('a') but just '\w' does not.

Second, of the literals in the pattern, none of them are considered to be
uppercase according to Unicode. For example, 'foo\pL' has no uppercase
literals but 'Foo\pL' does.

This overrides the -s/--case-sensitive and -i/--ignore-case flags.
 sort-filesDEPRECATEDDEPRECATED: Use --sort or --sortr instead.

Sort results by file path. Note that this currently disables all parallelism
and runs search in a single thread.

This flag can be disabled with --no-sort-files.
 no-sort-filessortsortrSORTBYSort results in ascending order. Implies --threads=1.This flag enables sorting of results in ascending order. The possible values
for this flag are:

    none      (Default) Do not sort results. Fastest. Can be multi-threaded.
    path      Sort by file path. Always single-threaded.
    modified  Sort by the last modified time on a file. Always single-threaded.
    accessed  Sort by the last accessed time on a file. Always single-threaded.
    created   Sort by the creation time on a file. Always single-threaded.

If the chosen (manually or by-default) sorting criteria isn't available on your
system (for example, creation time is not available on ext4 file systems), then
ripgrep will attempt to detect this, print an error and exit without searching.

To sort results in reverse or descending order, use the --sortr flag. Also,
this flag overrides --sortr.

Note that sorting results currently always forces ripgrep to abandon
parallelism and run in a single thread.
 modifiedaccessedcreatednone