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

--file output includes './' #21

Closed
cloudhead opened this issue Sep 23, 2016 · 2 comments
Closed

--file output includes './' #21

cloudhead opened this issue Sep 23, 2016 · 2 comments
Labels
enhancement An enhancement to the functionality of the software.

Comments

@cloudhead
Copy link

Hey, I'm playing around with rg as a replacement for ag in my fuzzy file finder and I noticed the output of rg --files includes a './' in the output, ex:

./src/file.c
./src/file2.c

In comparison to ag -g '' or ack -g '' which looks like this:

src/file.c
src/file2.c

Would you consider adding an option for this or changing it to match ack/ag? I'm aware I can use sed, but it would be nice if it was built-in.

Thanks

@BurntSushi
Copy link
Owner

I think the current behavior matches find right?

I'm not opposed to adding a flag. What about changing the default output instead?

@cloudhead
Copy link
Author

Yes, the current behaviour does match find. It has an option though (-print?) to change the output, but I'd say that's probably not worth implementing at this point. I'd be happy if the default didn't include ./, I think in general it might be a better default.

@BurntSushi BurntSushi added the enhancement An enhancement to the functionality of the software. label Sep 24, 2016
amsharma91 added a commit to amsharma91/ripgrep that referenced this issue Sep 27, 2016
This is kind of a ticky-tack change. I do think ./ as a prefix is
reasonable default, *but* we strip ./ when showing search results, so it
does make sense to be consistent.

Fixes BurntSushi#21.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement to the functionality of the software.
Projects
None yet
Development

No branches or pull requests

2 participants