Function: tramp-build-completion-file-name-regexp
tramp-build-completion-file-name-regexp is a byte-compiled function
defined in tramp.el.gz.
Signature
(tramp-build-completion-file-name-regexp)
Documentation
Return tramp-completion-file-name-regexp according to tramp-syntax.
Source Code
;; Defined in /usr/src/emacs/lisp/net/tramp.el.gz
(defun tramp-build-completion-file-name-regexp ()
"Return `tramp-completion-file-name-regexp' according to `tramp-syntax'."
(if (eq tramp-syntax 'separate)
;; FIXME: This shouldn't be necessary.
(tramp-compat-rx bos "/" (? "[" (* (not "]"))) eos)
(tramp-compat-rx
bos
;; `file-name-completion' uses absolute paths for matching.
;; This means that on W32 systems, something like
;; "/ssh:host:~/path" becomes "c:/ssh:host:~/path". See also
;; `tramp-drop-volume-letter'.
(? (regexp tramp-volume-letter-regexp))
;; We cannot use `tramp-prefix-regexp', because it starts with `bol'.
(literal tramp-prefix-format)
;; Optional multi hops.
(* (regexp tramp-remote-file-name-spec-regexp)
(regexp tramp-postfix-hop-regexp))
;; Last hop.
(? (regexp tramp-completion-method-regexp)
;; Method separator, user name and host name.
(? (regexp tramp-postfix-method-regexp)
(? (regexp tramp-user-regexp)
(regexp tramp-postfix-user-regexp))
(? (| (regexp tramp-host-regexp) ;; This includes a user.
(: (regexp tramp-prefix-ipv6-regexp)
(? (regexp tramp-ipv6-regexp)
(? (regexp tramp-postfix-ipv6-regexp))))))))
eos)))