diff options
Diffstat (limited to 'common/.config/emacs/init.el.org')
-rw-r--r-- | common/.config/emacs/init.el.org | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/common/.config/emacs/init.el.org b/common/.config/emacs/init.el.org index e72c719..c7826ce 100644 --- a/common/.config/emacs/init.el.org +++ b/common/.config/emacs/init.el.org @@ -314,19 +314,27 @@ Install and configure =eat= as a terminal emulator in Emacs. (use-package eat :init (setopt eat-kill-buffer-on-exit t) - ;;(add-to-list 'eshell-modules-list 'eshell-rebind) + (defun jj/eshell-quit-or-delete-char (arg) + (interactive "p") + (if (and (eolp) (looking-back eshell-prompt-regexp)) + (progn + (eshell-life-is-too-much) + (ignore-errors + (delete-window))) + (delete-forward-char arg))) :config (eat-eshell-mode) (setq eshell-visual-commands '()) :hook (eat-mode . (lambda () (display-line-numbers-mode -1))) (eshell-mode . (lambda () (display-line-numbers-mode -1) + (bind-keys :map eshell-mode-map ("C-d" . jj/eshell-quit-or-delete-char)) (eshell/alias "ll" "ls -alF $@*") (eshell/alias "la" "ls -a $@*") (eshell/alias "l" "ls -F $@*"))) :bind ("C-c v" . eshell) - (:map eshell-mode-map ("C-d" . eshell-delchar-or-maybe-eof))) + (:map eshell-mode-map ("C-d" . jj/eshell-quit-or-delete-char))) #+end_src Use =corfu= and =vertico= for completions. =orderless= is used to allow searching in any portion of a string and =marginalia= gives descriptions of items in the list. |