Eshell: shift+I inserts after prompt, correctly

This commit is contained in:
MitchMarq42 2022-08-27 10:56:42 -08:00
parent 26e966b56f
commit 95b2272a92

View File

@ -48,6 +48,10 @@ NAME and ARGS are in `use-package'."
:custom (eshell-scroll-to-bottom-on-input t) :custom (eshell-scroll-to-bottom-on-input t)
:config :config
(add-to-list 'eshell-modules-list 'eshell-rebind) (add-to-list 'eshell-modules-list 'eshell-rebind)
(defun eshell-evil-insert-line (count &optional vcount)
(interactive "p")
(eshell-bol)
(evil-insert count vcount))
(defun eshell/emacs (&rest args) (defun eshell/emacs (&rest args)
"Basically you can edit ARGS and it will open in a new buffer. "Basically you can edit ARGS and it will open in a new buffer.
When your shell is Emacs, your Emacs is but an oyster... When your shell is Emacs, your Emacs is but an oyster...
@ -57,7 +61,12 @@ This is taken from a website that I can't remember at the moment."
(mapc (mapc
#'find-file-other-window #'find-file-other-window
(mapcar (mapcar
#'expand-file-name (flatten-tree (reverse args))))))) #'expand-file-name (flatten-tree (reverse args))))))
:general
(general-define-key
:states 'normal
:maps 'eshell-mode-map
"I" 'eshell-evil-insert-line))
(elpaca-use-package eshell-vterm (elpaca-use-package eshell-vterm
:after eshell :after eshell
:custom (eshell-destroy-buffer-when-process-dies t) :custom (eshell-destroy-buffer-when-process-dies t)