Skip to content
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

Changing formatting of search results #700

Closed
tpoliaw opened this issue Nov 30, 2017 · 4 comments
Closed

Changing formatting of search results #700

tpoliaw opened this issue Nov 30, 2017 · 4 comments
Labels
question An issue that is lacking clarity on one or more points.

Comments

@tpoliaw
Copy link

tpoliaw commented Nov 30, 2017

When using --no-heading, is there any way to add a space between the filename and the :##:?

At the moment it concatenates the file, the line number and the line with the search result meaning that double clicking to select a file selects the number as well so double-click → middle-click to type a file name isn't possible.

@BurntSushi
Copy link
Owner

No, sorry. If you want this, I'd recommend writing a script that post-processes the output.

@BurntSushi BurntSushi added the question An issue that is lacking clarity on one or more points. label Nov 30, 2017
@tpoliaw
Copy link
Author

tpoliaw commented Dec 5, 2017

For anyone else having a similar issue, you can change how double-click selects words. For gnome-terminal, editGeneralSelect-by-word-characters → remove : from textbox.

@sergeevabc
Copy link

Is there a native way (some switch) to concatenate, join, merge lines in the output?

Now:
Bat
Cat
Dog

Expected:
Bat Cat Dog

@BurntSushi
Copy link
Owner

No. ripgrep isn't designed to perform arbitrary output manipulations. You'll need to find some other tool.

In the future, please don't necro post on old issues unless it's directly related. If you have a question, use Discussions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question An issue that is lacking clarity on one or more points.
Projects
None yet
Development

No branches or pull requests

3 participants