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

projectile-ripgrep do not search into hidden files #1708

Closed
pierrelegall opened this issue Sep 12, 2021 · 2 comments · Fixed by #1805
Closed

projectile-ripgrep do not search into hidden files #1708

pierrelegall opened this issue Sep 12, 2021 · 2 comments · Fixed by #1805

Comments

@pierrelegall
Copy link

The default behavior of ripgrep is to not search into hidden files (files beginning with a dot) by default. As a result, using projectile-ripgrep do not search into hidden files. This is from my point of view an unexpected behavior in the context of a project search.

Expected behavior

projectile-ripgrep should search into hidden files by default.

Actual behavior

projectile-ripgrep ignore hidden files.

Steps to reproduce the problem

Search with projectile-ripgrep a patterm you have in a hidden file of your project. You will not found it in the results.

Projectile version information

Projectile 2.4.0

Emacs version

Emacs 27.1 (Doom Emacs)

System info

GNU/Linux, Ubuntu 20.04
ripgrep 11.0.2

@bbatsov
Copy link
Owner

bbatsov commented Sep 12, 2021

Perhaps it'd be nice to introduce some defcustom controlling this behaviour for all search backends. I'd rather not hardcode this, as I assume different people have different expectations.

@nordlow
Copy link

nordlow commented Sep 14, 2021

I believe that .git directories should still be excluded as

alias rg="rg --hidden --glob '!.git'"

though. For details see BurntSushi/ripgrep#623.

NickSavage added a commit to NickSavage/projectile that referenced this issue Oct 14, 2022
The behaviour of projectile-ripgrep was inconsistent depending on
which package was being used. If the rg package was being used, hidden
files were included in the search, while if the ripgrep package was
being used, hidden files were excluded. This commit ensures that
hidden files are now consistently included, which is consistent with
the behaviour of other searches (like grep).
NickSavage added a commit to NickSavage/projectile that referenced this issue Oct 14, 2022
The behaviour of projectile-ripgrep was inconsistent depending on
which package was being used. If the rg package was being used, hidden
files were included in the search, while if the ripgrep package was
being used, hidden files were excluded. This commit ensures that
hidden files are now consistently included, which is consistent with
the behaviour of other searches (like grep).
bbatsov pushed a commit that referenced this issue Oct 25, 2022
The behaviour of projectile-ripgrep was inconsistent depending on
which package was being used. If the rg package was being used, hidden
files were included in the search, while if the ripgrep package was
being used, hidden files were excluded. This commit ensures that
hidden files are now consistently included, which is consistent with
the behaviour of other searches (like grep).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants