Function: projectile--ripgrep-ignore-globs
projectile--ripgrep-ignore-globs is a byte-compiled function defined
in projectile.el.
Signature
(projectile--ripgrep-ignore-globs &optional QUOTE)
Documentation
Return ripgrep --glob exclusions for the project's ignore patterns.
The patterns come from projectile--ignore-patterns and are passed to
ripgrep as they are - ripgrep's globs follow gitignore rules too.
Uses the --glob=!PATTERN form rather than --glob \=!PATTERN'', whose
surrounding single quotes are only stripped by POSIX shells - on Windows
cmd they become part of the pattern and the exclusion silently fails
(see #1946).
With QUOTE, quote each argument for the shell. The ripgrep package
joins these into a command line and hands it to shell-file-name, so a
pattern carrying a glob character arrives unprotected: zsh treats an
unmatched glob as an error rather than passing it through, and aborts
the whole search on --glob=!*.egg-info/ (see #2176). The rg package
quotes the flags it is given itself, so its caller has to leave them
alone.
Source Code
;; Defined in ~/.emacs.d/elpa/projectile-20260930.434/projectile.el
(defun projectile--ripgrep-ignore-globs (&optional quote)
"Return ripgrep `--glob' exclusions for the project's ignore patterns.
The patterns come from `projectile--ignore-patterns' and are passed to
ripgrep as they are - ripgrep's globs follow gitignore rules too.
Uses the `--glob=!PATTERN' form rather than `--glob \\='!PATTERN\\='', whose
surrounding single quotes are only stripped by POSIX shells - on Windows
`cmd' they become part of the pattern and the exclusion silently fails
\(see #1946).
With QUOTE, quote each argument for the shell. The `ripgrep' package
joins these into a command line and hands it to `shell-file-name', so a
pattern carrying a glob character arrives unprotected: zsh treats an
unmatched glob as an error rather than passing it through, and aborts
the whole search on `--glob=!*.egg-info/' (see #2176). The `rg' package
quotes the flags it is given itself, so its caller has to leave them
alone."
(mapcar (lambda (val)
(let ((arg (concat "--glob=!" val)))
(if quote (shell-quote-argument arg) arg)))
(projectile--ignore-patterns)))