Skip to content

Add --histogram=NUM argument#2918

Closed
Cabbache wants to merge 7 commits intoBurntSushi:masterfrom
Cabbache:master
Closed

Add --histogram=NUM argument#2918
Cabbache wants to merge 7 commits intoBurntSushi:masterfrom
Cabbache:master

Conversation

@Cabbache
Copy link

@Cabbache Cabbache commented Oct 23, 2024

With this output mode, rg will print a histogram of the number of matches within certain ranges of byte offsets. The width of the ranges is the bin size which is specified in the argument.

@BurntSushi
Copy link
Owner

Thanks for working on this. It looks neat. But I think this is too niche of a use case to have in ripgrep proper. And it seems likely to be a feature that begets more requests in terms of customizing how it works. It seems like you should be able to calculate this in an external tool by reading ripgrep's JSON output.

@BurntSushi BurntSushi closed this Aug 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants