Function: projectile-expand-file-name-wildcard

projectile-expand-file-name-wildcard is a byte-compiled function defined in projectile.el.

Signature

(projectile-expand-file-name-wildcard NAME-PATTERN DIR)

Documentation

Expand the maybe-wildcard-containing NAME-PATTERN in DIR.

If there are results expanding a wildcard, get the first result, otherwise expand NAME-PATTERN in DIR ignoring wildcards.

Source Code

;; Defined in ~/.emacs.d/elpa/projectile-20260310.858/projectile.el
(defun projectile-expand-file-name-wildcard (name-pattern dir)
  "Expand the maybe-wildcard-containing NAME-PATTERN in DIR.
If there are results expanding a wildcard, get the first result,
otherwise expand NAME-PATTERN in DIR ignoring wildcards."
  (let ((expanded (expand-file-name name-pattern dir)))
    (or (if (string-match-p "[[*?]" name-pattern)
            (car
             (ignore-errors (file-expand-wildcards expanded))))
        expanded)))