all repos — nixfiles @ a1b286b387fe9dcb9a0dd27d62c7709d005bcead

System and user configuration, managed by nix and home-manager

emacs: disable line numbers in eshell
Alan Pearce alan@alanpearce.eu
Fri, 24 Jan 2025 15:00:59 +0100
commit

a1b286b387fe9dcb9a0dd27d62c7709d005bcead

parent

5ea877fe690a870383f83ef5f8138e5abbe07fc0

1 files changed, 10 insertions(+), 0 deletions(-)

jump to
M user/emacs/init.eluser/emacs/init.el
@@ -139,6 +139,15 @@ (add-to-list 'default-frame-alist '(height . 40)) (setq-default display-line-numbers 'relative
               display-line-numbers-widen t
               display-line-numbers-width 4)
+
+(defun turn-off-display-line-numbers-mode ()
+  (interactive)
+  (display-line-numbers-mode -1))
+
+(defun turn-on-display-line-numbers-mode ()
+  (interactive)
+  (display-line-numbers-mode (default-value 'display-line-numbers)))
+
 (setq frame-resize-pixelwise t
       window-resize-pixelwise t
       display-buffer-alist `(("\\*\\(?:shell\\|compilation\\)\\*" display-buffer-in-side-window
@@ -736,6 +745,7 @@ (use-package eshell   :defer 5
   :commands (eshell)
   :functions (eshell/pwd)
+  :gfhook #'turn-off-display-line-numbers-mode
   :general (:keymaps 'eshell-command-map
                      "C-r" #'eshell-history-backwards
                      "C-s" #'eshell-history-forwards)