Function: tramp-dissect-hop-name
tramp-dissect-hop-name is a byte-compiled function defined in
tramp.el.gz.
Signature
(tramp-dissect-hop-name NAME &optional NODEFAULT)
Documentation
Return a tramp-file-name structure of hop part of NAME.
See tramp-dissect-file-name for details.
Source Code
;; Defined in /usr/src/emacs/lisp/net/tramp.el.gz
(defun tramp-dissect-hop-name (name &optional nodefault)
"Return a `tramp-file-name' structure of `hop' part of NAME.
See `tramp-dissect-file-name' for details."
(let ((v (tramp-dissect-file-name
(concat tramp-prefix-format
(replace-regexp-in-string
(tramp-compat-rx (regexp tramp-postfix-hop-regexp) eos)
tramp-postfix-host-format name))
nodefault)))
;; Only some methods from tramp-sh.el do support multi-hops.
(unless (or nodefault non-essential (tramp-multi-hop-p v))
(tramp-user-error
v "Method `%s' is not supported for multi-hops"
(tramp-file-name-method v)))
;; Return result.
v))