Skip to content

Commit db17c8b

Browse files
committed
Try to use zsh for remote vterm
1 parent 9c25c56 commit db17c8b

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

modules/config-modes.el

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1094,7 +1094,18 @@ if [ $1 = .. ]; then shift; fi; exec \"$@\""
10941094
:defer-install t
10951095
:config
10961096
(evil-set-initial-state 'vterm-mode 'emacs)
1097-
(set-face-foreground 'vterm-color-black "#586e75"))
1097+
(set-face-foreground 'vterm-color-black "#586e75")
1098+
1099+
(define-advice vterm--get-shell
1100+
(:around (old-fun) prefer-zsh)
1101+
(require 's)
1102+
(let ((old (funcall old-fun)))
1103+
(if (not (s-suffix? "/sh" old))
1104+
old
1105+
(or
1106+
(executable-find "zsh" t)
1107+
(executable-find "bash" t)
1108+
old)))))
10981109

10991110
;; =============================================================================
11001111
;; Config file modes ===========================================================

0 commit comments

Comments
 (0)