From 02b96abd633f0517619aceadb4ab29e8fcc3e787 Mon Sep 17 00:00:00 2001 From: Grégoire Duchêne Date: Sun, 1 Jun 2025 11:16:03 +0100 Subject: emacs: Add ‘my/eshell’ and bind it to ‘C-c e’ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- emacs/init.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'emacs') diff --git a/emacs/init.el b/emacs/init.el index d1f7172..e07cb65 100644 --- a/emacs/init.el +++ b/emacs/init.el @@ -218,6 +218,11 @@ (use-package esh-mode :config + (defun my/eshell () + (interactive) + (if (project-current) + (project-eshell) + (eshell))) (defun my/eshell-clear () (interactive) (if eshell-foreground-command @@ -228,7 +233,7 @@ (insert input)))) (add-to-list 'eshell-variable-aliases-list `("TERM" ,(lambda () "xterm-256colors") t t)) - :bind (("C-c e" . eshell) + :bind (("C-c e" . my/eshell) :map eshell-mode-map ("s-l" . my/eshell-clear) ("s-s" . consult-history)) -- cgit v1.2.3-70-g09d2