-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add option to report file position instead of line number #812
Comments
Definitely agree with this request. |
The spec for this looks quite straightforward. Duplicate what GNU Grep does, which is the following just to be clear:
|
Another question, how should this flag interact with In my current implementation, which is complete, this is how the output looks like with all 3 flags. The line number is colored in Green by default, and the match is colored in Red. The column number and byte offset are white. Are we good to go with this as the default?
GNU Grep does not have
|
I don't see the colors here, but it looks like the order when all three are requested is line:column:offset: Fine with me, I"m most interested in the '-b' case so I don't have a strong preference. But it seems sensible to have line and column output adjacent. |
What version of ripgrep are you using?
ripgrep 0.8.0 (rev 23d1b91)
+SIMD -AVX
What operating system are you using ripgrep on?
Ubuntu 16.04
Describe your question, feature request, or bug.
Please add a feature to report the file offset of the lines containing matches. GNU grep has this
I have a process that generates terabytes of diagnostic output daily. I desire to scan all that
for certain patterns and then to have a script read forward from the lines the patterns are on.
It would be much faster to fseek() to the offset of each matching line than to read all the data
counting lines. rg would be the perfect tool for generating the list of interesting offsets if it offered
that functionality. Thanks.
The text was updated successfully, but these errors were encountered: