From 44593376a7f2a5faf772d66774b8114667c5c6fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Lansing?= <65805+bjorne@users.noreply.github.com> Date: Wed, 23 Apr 2025 09:59:06 +0200 Subject: [PATCH] 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 40f3ddb16..4ba179427 100644 --- a/projectile.el +++ b/projectile.el @@ -4475,7 +4475,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