summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrégoire Duchêne <gduchene@awhk.org>2025-06-01 11:16:03 +0100
committerGrégoire Duchêne <gduchene@awhk.org>2025-06-01 14:27:27 +0100
commit02b96abd633f0517619aceadb4ab29e8fcc3e787 (patch)
treec7fff3213b1b35d0cf0d0dacb176ee619980b466
parente9316479314c12eaef0b19d8e9266f331439d7aa (diff)
emacs: Add ‘my/eshell’ and bind it to ‘C-c e’
-rw-r--r--emacs/init.el7
1 files changed, 6 insertions, 1 deletions
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))