Skip to content

Commit

Permalink
Use same shell as TRAMP on remotes.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Aleksei Fedotov committed Jan 16, 2023
1 parent f14d113 commit fcc4ec5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions vterm.el
Original file line number Diff line number Diff line change
Expand Up @@ -755,6 +755,7 @@ Exceptions are defined by `vterm-keymap-exceptions'."
(if (ignore-errors (file-remote-p default-directory))
(with-parsed-tramp-file-name default-directory nil
(or (cadr (assoc method vterm-tramp-shells))
(with-connection-local-variables shell-file-name)
vterm-shell))
vterm-shell))

Expand Down

0 comments on commit fcc4ec5

Please sign in to comment.