Fix projectile on Windows failing to index anything with ripgrep

Due to unescaped glob arguments.

Fixes #2897, and possibly #1803
This commit is contained in:
Henrik Lissner 2020-05-02 17:41:36 -04:00
parent f998c912c1
commit b51c4fc8b3
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 6 additions and 3 deletions

View file

@ -146,7 +146,7 @@ c) are not valid projectile projects."
;; .gitignore. This is recommended in the projectile docs.
((executable-find doom-projectile-fd-binary)
(setq projectile-generic-command
(format "%s . --color=never --type file --type symlink --follow -0 -H -E .git"
(format "%s . -0 -H -E .git --color=never --type file --type symlink --follow"
doom-projectile-fd-binary)
projectile-git-command projectile-generic-command
projectile-git-submodule-command nil
@ -158,7 +158,9 @@ c) are not valid projectile projects."
(setq projectile-generic-command
(concat "rg -0 --files --follow --color=never --hidden"
(cl-loop for dir in projectile-globally-ignored-directories
concat (format " --glob '!%s'" dir)))
concat " --glob "
concat (shell-quote-argument (concat "!" dir)))
(if IS-WINDOWS " --path-separator /"))
projectile-git-command projectile-generic-command
projectile-git-submodule-command nil
;; ensure Windows users get rg's benefits