-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Suggest ripgrep instead of the silver searcher
Since BurntSushi/ripgrep#200 is fixed in 0.7.1, we can safely suggest ripgrep as the candidate generator as it has a more precise implementation of gitignore filtering than the silver searcher.
- Loading branch information
Showing
1 changed file
with
15 additions
and
15 deletions.
There are no files selected for viewing
This file contains 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
5784101
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rg doesn't support an additional ignore file like ag. For me this makes it unusable. Why can't you just mention both?
5784101
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why should I mention both? These are just examples, you don't have to follow.
5784101
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@crapp You can use a negative glob (not sure if this is the correct terminology) to ignore extra files, e.g.
export FZF_DEFAULT_COMMAND='rg --files -g \'!*.jpg\''
5784101
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry but I need to ignore entire directories. For example documentation generated by doxygen.
5784101
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about this?
rg --files -g '!dir/**/*'
Though I agree that it would be nice if rg had support for extra ignore files5784101
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@junegunn Absolutely but ag is available in many linux distributions by default whereas ripgrep isn't. Wouldn't hurt to mention ag as well. I am not allowed to install any software on our debian production server which isn't available in official repositories. you know people will try to use what you suggest even if this is just an example
5784101
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chrfrasco we are sharing our agignore files within the project. there are 9 ignored directories and many more ignored files. putting this in a one line ripgrep call isn't very nice.
5784101
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rg supports addition ignore file