-
-
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 customize the separator character betwen paths, lines, columns and matches #1842
Comments
There is no way to customize it. But the underlying library does support customizing it: Lines 789 to 790 in 7923d25
I think I would be OK with a PR that adds two flags, one each for customizing the match and context separators for fields emitted in each case. As a hint, you'll want to use |
I'm also keen to have this feature, and my use-case is to make sure that the file path and line number are presented in the terminal in a way that can be ctrl+left clicked such that they will open to that line in VSCode. I use the following settings:
And the output looks like this:
Sometimes, the fact that there is no space after the 2nd colon on each line makes it such that VSCode won't open the file at that line, instead it will initiate a search that yields nothing. Having a space there makes this work 100% of the time. Removing |
I've forked the repo and started taking a preliminary look. If I manually change line 789 of Would you be open to accepting a PR that changes the |
@samwho Possibly. It depends on if there are any performance problems created by accepting multiple bytes vs one byte. It's been a while since I've touched that code, but my instinct is that there shouldn't be. |
@samwho did you come up with a solution? I have the same problem with VSCode link detection, and |
I'm afraid I didn't. |
As of version 12.1.1, if the
--no-heading
option is used then a:
will be used to separate paths, lines, columns (if the--column
option is used) and matches. Is it possible to customize those characters individually?For example I'd like to use a
@
between paths and lines, the default:
between lines and columns and a space between columns and matches.I'm new to ripgrep, I've read the manual but I haven't found anything about it so I assume this behaviour is not currently supported?
The text was updated successfully, but these errors were encountered: