diff options
| author | Grégoire Duchêne <gduchene@awhk.org> | 2025-04-06 09:13:18 +0100 |
|---|---|---|
| committer | Grégoire Duchêne <gduchene@awhk.org> | 2025-04-06 09:13:18 +0100 |
| commit | d2b118afc0b349a1a0c1c79dd946d8e0df1f98e5 (patch) | |
| tree | 51aae21559abc0aac9fd0a33a4b0b707e0281e20 | |
| parent | 588506c3ad3a99fd01801d4df37ddee7538881e6 (diff) | |
emacs: Improve Eshell buffer clearing
| -rw-r--r-- | emacs/init.el | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/emacs/init.el b/emacs/init.el index c2d4437..7ea5eaf 100644 --- a/emacs/init.el +++ b/emacs/init.el @@ -214,8 +214,17 @@ ;; Eshell -(use-package eshell - :bind (("C-c e" . eshell)) +(use-package esh-mode + :config + (defun my/eshell-clear () + (interactive) + (let ((input (eshell-get-old-input))) + (eshell/clear-scrollback) + (eshell-emit-prompt) + (insert input))) + :bind (("C-c e" . eshell) + :map eshell-mode-map + ("s-l" . my/eshell-clear)) :custom ((eshell-cmpl-ignore-case t) (eshell-aliases-file (expand-file-name "alias" user-emacs-directory)) (eshell-directory-name (my/cache-file-name "eshell")) |
