summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authortdback <tyler@tdback.net>2025-02-20 20:18:06 -0500
committertdback <tyler@tdback.net>2025-02-20 20:18:06 -0500
commit64357bc39ead381afee2706bd94e24c859f32417 (patch)
tree79260f2635f3b4b45191cdb2681035dffcd6cde3 /lisp
parent05aa829471b235533d07c3b7a58f38c39436c009 (diff)
lisp/td-shell: add workaround for local bindings to eshell buffers
Diffstat (limited to 'lisp')
-rw-r--r--lisp/td-shell.el9
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/td-shell.el b/lisp/td-shell.el
index 88714aa..ad76884 100644
--- a/lisp/td-shell.el
+++ b/lisp/td-shell.el
@@ -71,9 +71,12 @@ current line input."
(use-package eshell
:ensure nil
- :hook (eshell-first-time-mode . td/eshell-configure)
- :bind (("C-x E" . eshell)
- ("C-l" . td/eshell-clear))
+ :hook ((eshell-first-time-mode . td/eshell-configure)
+ ;; Workaround to bind keys locally to an eshell buffer.
+ ;; Apparently `:map eshell-mode-map' in `:bind' won't work.
+ (eshell-mode . (lambda ()
+ (define-key eshell-mode-map (kbd "C-l") #'td/eshell-clear))))
+ :bind (("C-x E" . eshell))
:config
(td/meow-insert-state 'eshell-mode))