You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I don't know when exactly this prefix (./) started to appear (maybe after fd v0.8.3) but I think this only adds noise to the results. So this PR adds --strip-cwd-prefix flag to remove the prefix.
@Conni2461 Ahh, You are right. And indeed this behavior was introduced in v0.8.3sharkdp/fd#861 so the previous versions won't be affected. We can close this If you want.
I just spent an hour trying to figure out why this ./ started showing up :)
Along the way I realized rg doesn't return the prefix while find does. So I guess there's already some variance between find_commands.
Okay. I am closing this because we cant really require a minimum fd version. For the future: rg --files doesnt add a ./ so either use that or define your own find_command like this:
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I don't know when exactly this prefix (
./
) started to appear (maybe afterfd v0.8.3
) but I think this only adds noise to the results. So this PR adds--strip-cwd-prefix
flag to remove the prefix.Before:

After:

PS: I might need guidance on updating the test :)