I feel like there is a better way of writing this with
use-package but I just can't get the usual way to work.
(use-package eshell :hook (eshell-mode . (lambda () (define-key eshell-mode-map (kbd "C-<backspace>") (lambda () ; clear shell (interactive) (message "I am some other function"))))))
I tried using the
:bind (:map eshell-mode-map ("C-<backspace>" . <lambda here>)), but that just binds the function to the global key map for some reason. Maybe because
nil till eshell is launched. Could someone suggest a better utilisation of use-package to write what I already have?