Skip to content

Commit 9068070

Browse files
Aleksei Fedotovjixiuf
authored andcommitted
Use same shell as TRAMP on remotes.
If emacs-vterm is started on a remote, use the same shell as TRAMP. That will guarantee that the shell exists on the remote. A shell could be chosen using `vterm-tramp-shells', but it tied to a specific TRAMP method. However, the same method (ssh) could be used to connected to different remotes, each with different default shell. So, we could use TRAMP to get the shell on per-remote basis.
1 parent ac10a67 commit 9068070

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

vterm.el

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -760,6 +760,7 @@ Exceptions are defined by `vterm-keymap-exceptions'."
760760
(if (ignore-errors (file-remote-p default-directory))
761761
(with-parsed-tramp-file-name default-directory nil
762762
(or (cadr (assoc method vterm-tramp-shells))
763+
(with-connection-local-variables shell-file-name)
763764
vterm-shell))
764765
vterm-shell))
765766

0 commit comments

Comments
 (0)