Function: auth-source-pass--name-port-user-suffixes

auth-source-pass--name-port-user-suffixes is a byte-compiled function defined in auth-source-pass.el.gz.

Signature

(auth-source-pass--name-port-user-suffixes NAME USER PORT)

Documentation

Return a list of possible path suffixes for NAME, USER, & PORT.

The resulting list is ordered from most specific to least specific, with paths matching all of NAME, USER, & PORT first, then NAME & USER, then NAME & PORT, then just NAME.

Source Code

;; Defined in /usr/src/emacs/lisp/auth-source-pass.el.gz
(defun auth-source-pass--name-port-user-suffixes (name user port)
  "Return a list of possible path suffixes for NAME, USER, & PORT.

The resulting list is ordered from most specific to least
specific, with paths matching all of NAME, USER, & PORT first,
then NAME & USER, then NAME & PORT, then just NAME."
  (seq-mapcat
   #'identity
   (list
    (when (and user port)
      (list
       (format "%s@%s%s%s" user name auth-source-pass-port-separator port)
       (format "%s%s%s/%s" name auth-source-pass-port-separator port user)))
    (when user
      (list
       (format "%s@%s" user name)
       (format "%s/%s" name user)))
    (when port
      (list
       (format "%s%s%s" name auth-source-pass-port-separator port)))
    (list
     (format "%s" name)))))