From efa2329513620f52cf2b7465e16f64b90c655b13 Mon Sep 17 00:00:00 2001 From: jao Date: Sun, 28 Feb 2021 05:30:01 +0000 Subject: eshell trick to use outlines --- init.org | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/init.org b/init.org index b2f51e6..0ac4769 100644 --- a/init.org +++ b/init.org @@ -2766,11 +2766,16 @@ #+end_src *** Eshell ***** Basic custom - #+BEGIN_SRC emacs-lisp - (setq eshell-directory-name "~/.emacs.d/eshell") - (setq eshell-aliases-file (jao-data-file "eshell.alias")) - (setq eshell-hist-ignoredups 'erase) - #+END_SRC + #+begin_src emacs-lisp + (use-package eshell + :init + (setq eshell-directory-name "~/.emacs.d/eshell") + (setq eshell-aliases-file (jao-data-file "eshell.alias")) + (setq eshell-hist-ignoredups 'erase) + :config + (add-hook 'eshell-mode-hook + (lambda () (setq outline-regexp eshell-prompt-regexp)))) + #+end_src ***** Colors #+begin_src emacs-lisp (autoload 'ansi-color-apply "ansi-color") @@ -2906,7 +2911,8 @@ ***** Keybindings #+begin_src emacs-lisp (defun jao-eshell--kbds () - (define-key eshell-mode-map "\C-a" 'jao-eshell-maybe-bol)) + (define-key eshell-mode-map "\C-a" 'jao-eshell-maybe-bol) + (define-key eshell-mode-map "\C-ci" 'consult-outline)) ;; Eshell mode is sillily re-creating its mode map ;; in every buffer in emacs < 28. (if (> emacs-major-version 27) -- cgit v1.2.3