Variable: tramp-file-name-structure

tramp-file-name-structure is a variable defined in tramp.el.gz.

Value

("^/\\(\\(?:\\([[:alnum:]-]+\\):\\(?:\\([^/|:   ]+\\)@\\)?\\(\\(?:[[:alnum:]_.%-]+\\|\\[\\(?:\\(?:[[:alnum:]]*:\\)+[[:alnum:].]+\\)?]\\)\\(?:#[[:digit:]]+\\)?\\)?|\\)+\\)?\\([[:alnum:]-]+\\):\\(?:\\([^/|:    ]+\\)@\\)?\\(\\(?:[[:alnum:]_.%-]+\\|\\[\\(?:\\(?:[[:alnum:]]*:\\)+[[:alnum:].]+\\)?]\\)\\(?:#[[:digit:]]+\\)?\\)?:\\([^\n
]*\\'\\)" 5 6 7 8 1)

Documentation

List detailing the Tramp file name structure.

This is a list of six elements (REGEXP METHOD USER HOST FILE HOP).

The first element REGEXP is a regular expression matching a Tramp file name. The regex should contain parentheses around the method name, the user name, the host name, and the file name parts.

The second element METHOD is a number, saying which pair of parentheses matches the method name. The third element USER is similar, but for the user name. The fourth element HOST is similar, but for the host name. The fifth element FILE is for the file name. The last element HOP is the ad-hoc hop definition, which could be a cascade of several hops.

These numbers are passed directly to match-string, which see. That means the opening parentheses are counted to identify the pair.

See also tramp-file-name-regexp.

Source Code

;; Defined in /usr/src/emacs/lisp/net/tramp.el.gz
(defvar tramp-file-name-structure nil ;Initialized when defining `tramp-syntax'!
  "List detailing the Tramp file name structure.
This is a list of six elements (REGEXP METHOD USER HOST FILE HOP).

The first element REGEXP is a regular expression matching a Tramp file
name.  The regex should contain parentheses around the method name,
the user name, the host name, and the file name parts.

The second element METHOD is a number, saying which pair of
parentheses matches the method name.  The third element USER is
similar, but for the user name.  The fourth element HOST is similar,
but for the host name.  The fifth element FILE is for the file name.
The last element HOP is the ad-hoc hop definition, which could be a
cascade of several hops.

These numbers are passed directly to `match-string', which see.  That
means the opening parentheses are counted to identify the pair.

See also `tramp-file-name-regexp'.")