@@ -168,6 +168,14 @@ the executable."
168
168
:type 'string
169
169
:group 'vterm )
170
170
171
+ (defcustom vterm-tramp-shells '((" docker" " /bin/sh" ))
172
+ " The shell that gets run in the vterm for tramp.
173
+
174
+ `vterm-tramp-shells' has to be a list of pairs of the format:
175
+ \( TRAMP-METHOD SHELL)"
176
+ :type '(alist :key-type string :value-type string)
177
+ :group 'vterm )
178
+
171
179
(defcustom vterm-buffer-name " *vterm*"
172
180
" The basename used for vterm buffers.
173
181
This is the default name used when running `vterm' or
@@ -707,7 +715,7 @@ Exceptions are defined by `vterm-keymap-exceptions'."
707
715
; ; See: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=220009
708
716
(if (eq system-type 'berkeley-unix ) " " " iutf8" )
709
717
(window-body-height )
710
- width vterm-shell))
718
+ width ( vterm--get- shell) ))
711
719
; ; :coding 'no-conversion
712
720
:connection-type 'pty
713
721
:file-handler t
@@ -734,6 +742,14 @@ Exceptions are defined by `vterm-keymap-exceptions'."
734
742
(setq next-error-function 'vterm-next-error-function )
735
743
(setq-local bookmark-make-record-function 'vterm--bookmark-make-record ))
736
744
745
+ (defun vterm--get-shell ()
746
+ " Get the shell that gets run in the vterm."
747
+ (if (ignore-errors (file-remote-p default-directory))
748
+ (with-parsed-tramp-file-name default-directory nil
749
+ (or (cadr (assoc method vterm-tramp-shells))
750
+ vterm-shell))
751
+ vterm-shell))
752
+
737
753
(defun vterm--bookmark-make-record ()
738
754
" Create a vterm bookmark.
739
755
0 commit comments