branch: elpa/projectile
commit 2018db10ad134759a439f769d3f006a31c89061a
Author: Björn Lansing <65805+bjo...@users.noreply.github.com>
Commit: Bozhidar Batsov <bozhi...@batsov.dev>

    Quote ignore globs in projectile-ripgrep
    
    Otherwise, the globs are interpreted by the shell which may lead to errors
    such as
    
        zsh:1: no matches found: !*.bundle.js
    
    In this example the command was
    
        /usr/bin/rg [...] --glob !*.bundle.js [...]
    
    and after this change will become
    
        /usr/bin/rg [...] --glob '!*.bundle.js' [...]
---
 projectile.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/projectile.el b/projectile.el
index ea9e1d09a4..830de5c179 100644
--- a/projectile.el
+++ b/projectile.el
@@ -4476,7 +4476,7 @@ installed to work."
    (list (projectile--read-search-string-with-default
           (format "Ripgrep %ssearch for" (if current-prefix-arg "regexp " "")))
          current-prefix-arg))
-  (let ((args (mapcar (lambda (val) (concat "--glob !" val))
+  (let ((args (mapcar (lambda (val) (concat "--glob '!" val "'"))
                       (append projectile-globally-ignored-files
                               projectile-globally-ignored-directories))))
     ;; we rely on the external packages ripgrep and rg for the actual search

Reply via email to