diff options
author | Case Duckworth | 2021-04-01 17:56:24 -0500 |
---|---|---|
committer | Case Duckworth | 2021-04-01 17:56:24 -0500 |
commit | bf6a117838b6423dfa6a9fedf201b49630e63b08 (patch) | |
tree | 91182e4b8bb6533873ef7d1e1e1629a617847139 | |
parent | Move MS Windows settings above Etc settings and add some (diff) | |
download | emacs-bf6a117838b6423dfa6a9fedf201b49630e63b08.tar.gz emacs-bf6a117838b6423dfa6a9fedf201b49630e63b08.zip |
Add ^D binding to quit eshell
-rw-r--r-- | init.el | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/init.el b/init.el index 3ae414c..8431248 100644 --- a/init.el +++ b/init.el | |||
@@ -306,8 +306,19 @@ | |||
306 | 306 | ||
307 | ;;;; Eshell | 307 | ;;;; Eshell |
308 | (setup eshell | 308 | (setup eshell |
309 | (defun eshell-quit-or-delete-char (arg) | ||
310 | "Delete the character to the right, or quit eshell on an empty line." | ||
311 | (interactive "p") | ||
312 | (if (and (eolp) (looking-back eshell-prompt-regexp)) | ||
313 | (eshell-life-is-too-much) | ||
314 | (delete-forward-char arg))) | ||
309 | (:option eshell-directory-name (acdw/in-dir "eshell/" t) | 315 | (:option eshell-directory-name (acdw/in-dir "eshell/" t) |
310 | eshell-aliases-file (acdw/in-dir "eshell/aliases" t))) | 316 | eshell-aliases-file (acdw/in-dir "eshell/aliases" t)) |
317 | (add-hook 'eshell-mode-hook | ||
318 | (defun hook--eshell-setup () | ||
319 | "Stuff to do after eshell is done setting up." | ||
320 | (define-key eshell-mode-map (kbd "C-d") | ||
321 | #'eshell-quit-or-delete-char)))) | ||
311 | 322 | ||
312 | ;;;; Debugger | 323 | ;;;; Debugger |
313 | (setup debugger | 324 | (setup debugger |