Add ^D binding to quit eshell

This commit is contained in:
Case Duckworth 2021-04-01 17:56:24 -05:00
parent d04a3bbd78
commit bf6a117838
1 changed files with 12 additions and 1 deletions

13
init.el
View File

@ -306,8 +306,19 @@
;;;; Eshell
(setup eshell
(defun eshell-quit-or-delete-char (arg)
"Delete the character to the right, or quit eshell on an empty line."
(interactive "p")
(if (and (eolp) (looking-back eshell-prompt-regexp))
(eshell-life-is-too-much)
(delete-forward-char arg)))
(:option eshell-directory-name (acdw/in-dir "eshell/" t)
eshell-aliases-file (acdw/in-dir "eshell/aliases" t)))
eshell-aliases-file (acdw/in-dir "eshell/aliases" t))
(add-hook 'eshell-mode-hook
(defun hook--eshell-setup ()
"Stuff to do after eshell is done setting up."
(define-key eshell-mode-map (kbd "C-d")
#'eshell-quit-or-delete-char))))
;;;; Debugger
(setup debugger