From 64357bc39ead381afee2706bd94e24c859f32417 Mon Sep 17 00:00:00 2001 From: tdback Date: Thu, 20 Feb 2025 20:18:06 -0500 Subject: lisp/td-shell: add workaround for local bindings to eshell buffers --- lisp/td-shell.el | 9 ++++++--- 1 file 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)) -- cgit v1.2.3