projectile icon indicating copy to clipboard operation
projectile copied to clipboard

`projectile-ripgrep` do not search into hidden files

Open pierrelegall opened this issue 4 years ago • 2 comments

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

pierrelegall avatar Sep 12 '21 12:09 pierrelegall

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.

bbatsov avatar Sep 12 '21 17:09 bbatsov

I believe that .git directories should still be excluded as

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

though. For details see https://github.com/BurntSushi/ripgrep/issues/623.

nordlow avatar Sep 14 '21 08:09 nordlow