Variable: tramp-shell-prompt-pattern
tramp-shell-prompt-pattern is a customizable variable defined in
tramp.el.gz.
Value
"\\(?:^\\|
\\)[^]\n#-%>]*#?[]#-%>][[:blank:]]*"
Documentation
Regexp to match prompts from remote shell.
Normally, Tramp expects you to configure shell-prompt-pattern
correctly, but sometimes it happens that you are connecting to a
remote host which sends a different kind of shell prompt. Therefore,
Tramp recognizes things matched by shell-prompt-pattern as prompt,
and also things matched by this variable. The default value of this
variable is similar to the default value of shell-prompt-pattern,
which should work well in many cases.
This regexp must match both tramp-initial-end-of-output and
tramp-end-of-output.
Source Code
;; Defined in /usr/src/emacs/lisp/net/tramp.el.gz
(defcustom tramp-shell-prompt-pattern
;; Allow a prompt to start right after a ^M since it indeed would be
;; displayed at the beginning of the line (and Zsh uses it).
;; Allow also [] style prompts. They can appear only during
;; connection initialization; Tramp redefines the prompt afterwards.
(rx (| bol "\r")
(* (not (any "\n#$%>]")))
(? "#") (any "#$%>]") (* blank))
"Regexp to match prompts from remote shell.
Normally, Tramp expects you to configure `shell-prompt-pattern'
correctly, but sometimes it happens that you are connecting to a
remote host which sends a different kind of shell prompt. Therefore,
Tramp recognizes things matched by `shell-prompt-pattern' as prompt,
and also things matched by this variable. The default value of this
variable is similar to the default value of `shell-prompt-pattern',
which should work well in many cases.
This regexp must match both `tramp-initial-end-of-output' and
`tramp-end-of-output'."
:type 'regexp)