Re: TRAMP hangs if remote login shell is fish
Michael Albinus <[email protected]> Fri, 09 May 2025 09:16:46 +0200
| Newsgroups | gmane.emacs.tramp |
|---|---|
| Message-ID | <[email protected]> |
ID <[email protected]> writes: Hi, >> You have the option to modify tramp-shell-prompt-pattern >> accordingly. But there is a more simple alternative: Use '/sshx:me308:' >> instead of '/ssh:me308:'. This open '/bin/sh -i', and avoids your login >> shell. > > I see, thanks for the help :) Good that it works. However, I made an experiment: Could you pls apply the appended patch to tramp-sh.el, recompile and start a new Emacs session. It should work then also for the '/ssh:me308:' access with a remote fish shell. Best regards, Michael.
(unnamed)
(text/x-patch, 654 B)
diff --git a/lisp/tramp-sh.el b/lisp/tramp-sh.el
index 9d74c2fd..aead88ce 100644
--- a/lisp/tramp-sh.el
+++ b/lisp/tramp-sh.el
@@ -251,7 +251,9 @@ The string is used in `tramp-methods'.")
`("ssh"
(tramp-login-program "ssh")
(tramp-login-args (("-l" "%u") ("-p" "%p") ("%c")
- ("-e" "none") ("%h")))
+ ("-e" "none")
+ ("-o" "SetEnv=\"TERM=dumb\"")
+ ("%h")))
(tramp-async-args (("-q")))
(tramp-direct-async ("-t" "-t"))
(tramp-remote-shell ,tramp-default-remote-shell)