Function: projectile--ag-construct-command

projectile--ag-construct-command is a byte-compiled function defined in projectile.el.

Signature

(projectile--ag-construct-command SEARCH-TERM &optional FILE-EXT)

Documentation

Construct Ag option to search files by the extension FILE-EXT.

Source Code

;; Defined in ~/.emacs.d/elpa/projectile-20260310.858/projectile.el
(defun projectile--ag-construct-command (search-term &optional file-ext)
  "Construct Ag option to search files by the extension FILE-EXT."
  (if (stringp file-ext)
      (concat (alist-get 'ag projectile-files-with-string-commands)
              "-G "
              (replace-regexp-in-string
               "\\*" ""
               (replace-regexp-in-string "\\." "\\\\." file-ext))
              "$ "
              search-term)
    (concat (alist-get 'ag projectile-files-with-string-commands)
            search-term)))