Set up EShell to use VTerm as its visual exec runner
This commit is contained in:
parent
cbb0aa69f1
commit
b7c4e383a2
@ -4001,9 +4001,22 @@ Spotify in Emacs!
|
||||
* VTerm
|
||||
A better terminal emulator for Emacs. Replaces ansi-term, not EShell.
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(defun eshell-exec-in-vterm (&rest args)
|
||||
(let* ((program (car args))
|
||||
(buf (generate-new-buffer
|
||||
(concat "*" (file-name-nondirectory program) "*"))))
|
||||
(with-current-buffer buf
|
||||
(vterm-mode)
|
||||
(vterm-send-string (concat (s-join " " args) "\n")))
|
||||
(switch-to-buffer buf)))
|
||||
|
||||
(use-package vterm
|
||||
:if module-file-suffix
|
||||
:commands (vterm vterm-other-window))
|
||||
:init
|
||||
(with-eval-after-load 'em-term
|
||||
(defun eshell-exec-visual (&rest args)
|
||||
(apply #'eshell-exec-in-vterm args)))
|
||||
:commands (vterm vterm-other-window vterm-mode))
|
||||
|
||||
(defun open-vterm (&optional new-buffer)
|
||||
(interactive "P")
|
||||
|
Loading…
Reference in New Issue
Block a user