Tassilo Horn <t...@gnu.org> writes: > Hi all,
Hi Tassilo, > I tried to find-file /mosh:h...@tsdh.org:/home<TAB>, and that's what I > get in the *debug tramp/mosh h...@tsdh.org* buffer. (Well, I TAB-ed > more than once, so the messages might be a bit more longish than > needed.) > > In *Messages* I get "byte-code: Host `tsdh.org' looks like a remote > host, `mosh' can only use the local host". That's simple to fix: --8<---------------cut here---------------start------------->8--- *** ~/src/tramp/lisp/tramp-sh.el.~2.81~ 2012-09-03 15:25:57.740895595 +0200 --- ~/src/tramp/lisp/tramp-sh.el 2012-09-03 15:13:43.631022840 +0200 *************** *** 406,411 **** --- 406,418 ---- (tramp-copy-program "fcp") (tramp-copy-args (("-p" "%k"))) (tramp-copy-keep-date t))) + ;;;###tramp-autoload + (add-to-list 'tramp-methods + '("mosh" + (tramp-login-program "env LC_ALL=en_US.UTF-8 /usr/bin/mosh") + (tramp-login-args (("-p" "%p") ("%u@%h"))) + (tramp-remote-shell "/bin/sh") + (tramp-remote-shell-args ("-c")))) ;;;###tramp-autoload (add-to-list 'tramp-default-method-alist *************** *** 4258,4263 **** --- 4265,4272 ---- ;; The host name is used for the remote shell command. (member '("%h") (tramp-get-method-parameter method 'tramp-login-args)) + (member + '("%u@%h") (tramp-get-method-parameter method 'tramp-login-args)) ;; The host is local. We cannot use `tramp-local-host-p' ;; here, because it opens a connection as well. (string-match tramp-local-host-regexp host)) *************** *** 4378,4383 **** --- 4387,4398 ---- p 60 "Couldn't find local shell prompt %s" tramp-encoding-shell) + ;; "mosh" needs a row size > 0. + (tramp-message vec 6 "%s" "stty rows 40 columns 80") + (tramp-send-string vec "stty rows 40 columns 80") + (tramp-barf-if-no-shell-prompt + p 5 "Couldn't find local shell prompt") + ;; Now do all the connections as specified. (while target-alist (let* ((hop (car target-alist)) --8<---------------cut here---------------end--------------->8--- However, mosh requires an interactive tty, and it swamps the Tramp connection buffer with escape sequences then (you see it in the debug buffer, when `tramp-verbose' is set to 10). I have no real idea how to fix this. > Bye, > Tassilo Best regards, Michael. _______________________________________________ Tramp-devel mailing list Tramp-devel@gnu.org https://lists.gnu.org/mailman/listinfo/tramp-devel