Function: projectile-consult--file-command

projectile-consult--file-command is a byte-compiled function defined in projectile-consult.el.

Signature

(projectile-consult--file-command COMMAND)

Documentation

Wrap a Projectile indexing COMMAND for Consult's process collection.

COMMAND emits NUL-separated paths (Projectile uses -z/-0/-print0), but Consult's process pipeline splits its input on newlines, so translate NUL to newline with tr. Returns a command list (PROGRAM ARGS...) suitable as the return value of a Consult process builder.

Source Code

;; Defined in ~/.emacs.d/elpa/projectile-20260930.434/projectile-consult.el
(defun projectile-consult--file-command (command)
  "Wrap a Projectile indexing COMMAND for Consult's process collection.
COMMAND emits NUL-separated paths (Projectile uses -z/-0/-print0), but
Consult's process pipeline splits its input on newlines, so translate
NUL to newline with `tr'.  Returns a command list (PROGRAM ARGS...)
suitable as the return value of a Consult process builder."
  ;; Octal \\000 rather than \\0 so the escape is understood by both GNU and
  ;; BSD `tr'.
  (list shell-file-name shell-command-switch
        (concat command " | tr '\\000' '\\n'")))