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

Fix searching ignored directories for ripgrep #1914

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

shutosheep
Copy link

Currently projectile-ripgrep does not properly hide directories of projectile-globally-ignored-directories as mentioned in issue #1811 . projectile-ripgrep produces following arguments for searching.

rg  --fixed-strings --hidden --glob !TAGS --glob !^\.idea$ --glob !^\.vscode$ ...

I found that there are two problems:

  • Both ignored file and directory name is not quoted with '
  • Directory name includes regexp which I believe --glob option does not support

In this PR, I made both globally ignored file and directory names to be quoted with ' and remove unnecessary regexp (^\ and $) from projectile-globally-ignored-directories. This results in making arguments such as...

rg  --fixed-strings --hidden --glob '!TAGS' --glob '!.idea' --glob '!.vscode' ...

resulting with ripgrep properly ignoring contents of projectile-globally-ignored-directories.

By the way I am new to emacs lisp, so feel free to edit my changes.


Before submitting a PR make sure the following things have been done (and denote this
by checking the relevant checkboxes):

  • The commits are consistent with our contribution guidelines
  • You've added tests (if possible) to cover your change(s)
  • All tests are passing (eldev test)
  • The new code is not generating bytecode or M-x checkdoc warnings
  • You've updated the changelog (if adding/changing user-visible functionality)
  • You've updated the readme (if adding/changing user-visible functionality)

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant