GitShow/BurntSushi/ripgrep
BurntSushi

ripgrep

ripgrep recursively searches directories for a regex pattern while respecting your gitignore

by BurntSushi
clicommand-linecommand-line-toolgitignoregreprecursively-searchregexripgrep
Star on GitHubFork

Rust

65.7k stars2.6k forks459 contributorsActive · 1d agoSince 201615.1.0Unlicense

Meet the team

See all 459 on GitHub →
BurntSushi
BurntSushi1.5k contributions
okdana
okdana46 contributions
jgarte
jgarte11 contributions
balajisivaraman
balajisivaraman10 contributions
tiehuis
tiehuis9 contributions
ericbn
ericbn7 contributions
lyuha
lyuha7 contributions
atouchet
atouchet6 contributions

Languages

View on GitHub →
Rust94.6%
Python2.6%
Shell2.1%
Roff0.7%
Ruby0%

Commit activity

Last 12 weeks · 10 commits

Full graph →

Community health

3 of 6 standards met

Community profile →
71
✓README✓License✓Contributing○Code of Conduct○Issue Template○PR Template

Recent PRs & issues

Active · Last activity 1d ago
See all on GitHub →
ngirard
Implement such `--files-from` optionOpenIssue

A recurring workflow of mine is to search within an existing list of files. Currently I'm living by which is both inconvenient and inefficient. Ack does provide a option. Implementing it would allow me to type to fulfill my needs.

ngirard · 21h ago
ltrzesniewski
Read input paths from a file or stdinOpenIssue

I'd like to suggest a new option, such as or (name TBD, the shorter the better), very similar to the existing , which would read the list of files or directories to be searched from . The value would mean the list should be read from stdin. Here are some use cases: Search from an existing (potentially long) list of files, which was previously generated, and could be reused across several calls. Search for files containing multiple patterns, but not necessarily on the same line, by chaining calls. As an example: searching for files containing , and : The output would be a nicely presented list of matches, with headings. This also shows why a short option name would be useful. This would be an equivalent to the following on Linux: But my main usage is on Windows, which doesn't have , so the same command on PowerShell would be: Not only is it less readable (IMO), but it also doesn't support long lists of files to search from, as command-line arguments are limited to 32 kb on Windows: Probably some other usages from #875 Of course, would have to be incompatible with and stdin input. I know you don't like adding more options, and for full disclosure I already have a script which handles this, but I believe this would be a useful feature for many people. If you'd like, I think I can write and submit a simple implementation in which would be based on (which handles ). The main issue I see with this approach is that stdin would need to be drained before the search begins, but this is already the case with anyway. I just wanted to check with you first if that's something you'd be willing to accept.

ltrzesniewski · 23h ago
curious-rabbit
Sanitize control bytesOpenPR

Filenames and file contents can contain terminal control sequences like OSC52 clipboard writes, OSC8 hyperlink injection, cursor moves that spoof output. When ripgrep prints them to a tty, the terminal acts on them. This PR sanitizes the relevant sequences before they reach the terminal. Sanitization is gated on whether stdout is an interactive tty. Pipe output is left byte-exact so , , , and similar pipelines see exactly the bytes they see today. Implementation is a 256-byte lookup table with a four-way branch. The fast path returns Cow::Borrowed without allocating. On a 50 MB / ~80k-match Rust corpus the tty path runs within the noise of the unsanitized baseline. Library API change is additive: one is_terminal(bool) method per printer (Standard, Summary, PathPrinter), default false. Existing embedders see no behavior change unless they opt in. Covers: matched-line content, printed paths in standard/summary/path-list output, and stderr error messages from .gitignore parsing (see issue #1992). JSON output is unaffected. @BurntSushi I know you had some resevationas bout filters in the past but I hope this approach with interactive vs piped matches how you want ripgrep to behave while we can also address the relevant risks. There is no measurable performance impact

curious-rabbit · 2d ago

Recent fixes

View closed PRs →
tmccombs
feat[ignore]: Always include depth in errors from WalkDirMergedPR

Include the depth in I/O errors from WalkDir as well, so that the consumer can handle the error differently depending on depth. For example, this would allow ignore broken symlinks that don't match certain depth criteria. Fixes: #3453

tmccombs · 1d ago
tmccombs
[ignore] Include depth in WithPath error.ClosedIssue

Describe your feature request https://github.com/sharkdp/fd/issues/1017 would be significantly easier to fix if included the depth, relative to the root of the path the error occurred on. Specifically, in the event we get an error for a broken symlink, it allows us to know the depth of the broken symlink, which informs whether or not we should output anything for it.

tmccombs · 1d ago
SyntaxSawdust
Update GUIDE.md examples for the latest release.MergedPR

Summary I updated to use the latest ripgrep release archive instead of . I refreshed the tutorial command outputs that depend on the archive contents. Recursive examples now use where stable path sorting is needed. Why This addresses #3448. The guide previously downloaded , but later examples search for . has no matches, while does. Tests no matches matches found Checked the refreshed examples against an archive-shaped tree Scope Docs only. only. No code, tests, generated files, or release scripts changed.

SyntaxSawdust · 2d ago
Structured data for AI agents

Repository: BurntSushi/ripgrep. Description: ripgrep recursively searches directories for a regex pattern while respecting your gitignore Stars: 65737, Forks: 2617. Primary language: Rust. Languages: Rust (94.6%), Python (2.6%), Shell (2.1%), Roff (0.7%), Ruby (0%). License: Unlicense. Topics: cli, command-line, command-line-tool, gitignore, grep, recursively-search, regex, ripgrep, rust, search. Latest release: 15.1.0 (8mo ago). Open PRs: 83, open issues: 121. Last activity: 1d ago. Community health: 71%. Top contributors: BurntSushi, okdana, jgarte, balajisivaraman, tiehuis, ericbn, lyuha, atouchet, theamazingfedex, igor-raits and others.

·@ofershap

Replace github.com with gitshow.dev