ripgrep: A line-oriented search tool that recursively searches the current directory for a regex pattern.
What problem it solves
ripgrep is a line-oriented search tool that recursively searches the current directory for a regex pattern. By default, it respects gitignore rules and automatically skips hidden files/directories and binary files.
Key features
Automatic ignore-aware filtering — By default the tool skips files ignored by .gitignore/.ignore/.rgignore files, hidden files and directories, and binary files, with all automatic filtering disabled via `rg -uuu`.
Source: README
File type filtering — Searches can be limited to or exclude specific file types, for example `rg -tpy foo` for Python files or `rg -Tjs foo` to exclude JavaScript files, and new types can be taught via custom matching rules.
Source: README
Grep-style features with full Unicode — Includes context display, multiple patterns, colored match highlighting, and Unicode support that is always on, plus multiline search spanning multiple lines.
Source: README
Optional PCRE2 regex engine — The regex engine can be switched to PCRE2 with `-P/--pcre2` or `--auto-hybrid-regex`, enabling look-around and backreferences that the default engine does not support; an alternative syntax is available via `--engine (default|pcre2|auto)`.
Source: README
Compressed files, encodings and preprocessors — It can search files in text encodings other than UTF-8 such as UTF-16, latin-1, GBK, EUC-JP and Shift_JIS, search files compressed with brotli, bzip2, gzip, lz4, lzma, xz or zstandard via `-z/--search-zip`, and apply arbitrary input preprocessing filters.
Source: README
Quick start
Copied verbatim from the project's README.
$ cargo install ripgrep$ git clone https://github.com/BurntSushi/ripgrep
$ cd ripgrep
$ cargo build --release
$ ./target/release/rg --version
0.1.3Who it may suit
This may suit developers and system administrators who routinely search large code or text trees from the command line and want ignore-aware results without extra flags. It may also suit users of Unix-like search tools who want Unicode, multiline, and compressed-file search in a single command-line program.
Topics to discuss
How should ripgrep handle gitignore matching in nested and multi-root directory trees to avoid the class of bugs fixed in recent releases?
Which missing filtering rules or configuration options would make ripgrep more useful for monorepos and mixed-language code bases?
How can the community contribute benchmarks, translation updates, or documentation improvements to the user guide and FAQ?
Written by ReadmeX AI from the project's README, source and public GitHub data; it may contain mistakes.
Read the original README https://github.com/BurntSushi/ripgrep#readme
ReadmeX opened this community for a trending project; it is not run by the project. Maintainers can claim it from the community page.
Comments
…