2

I have been trying to get tramp working and I am having issues with recognizing the remote prompt. Unfortunately, I cannot change the remote prompt because it is dictated by my school.

I have tried changing the tramp-shell-prompt and tramp-terminal-prompt-regex variables to detect the prompt but I am not having success.

The remote response upon logging in is:

Last login: Tue Nov 13 17:59:43 2018 from ************
Disk quotas for user mdaly04 (uid *****):
     Filesystem   space   quota   limit   grace   files   quota   limit  grace
vs-home:/tufts_ugrad
                   283M    900M   1024M           10500   90000    100k
vs-etc:/g
                 26448K   1843M   2048M            3121    236k    263k
vm-hw03{mdaly04}51: 

The last line is the shell prompt after login. The numbers in the prompt (such as 51 or 03) will change on each login. The storage information can change as well.

The regex I am trying to use is: (.{1,}\s){1,}.{1,}:
Checked with ... https://regex101.com/r/pW2dE4/67

Debug w/ verbose 10:
http://sprunge.us/1NotAz

Matt Daly
  • 21
  • 1
  • You appear to be using PCRE regexp syntax at regex101.com which isn't going to work. Furthermore it doesn't appear to even offer anything like Emacs syntax at all (BRE syntax would be a similar ballpark, but bizarrely it doesn't even provide that option), so basically don't use that site. Use `M-x re-builder` to test regexps in Emacs. See also https://emacs.stackexchange.com/q/5568/454 to prevent confusion. – phils Aug 11 '19 at 20:56

1 Answers1

2

I would try the following setting:

(setq tramp-shell-prompt-pattern  "[-a-z0-9]+{[a-z0-9]+}[0-9]+: *")
Michael Albinus
  • 6,647
  • 14
  • 20