aboutsummaryrefslogtreecommitdiffstats
path: root/emacs/.emacs.d/init/oni-eshell-init.org
blob: 143c1406807d0179a78f95b828d7dadd13d25b2d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#+TITLE: Eshell configuration

#+BEGIN_SRC emacs-lisp
  (require 'eshell)
#+END_SRC

Truncate the eshell buffer when it gets larger than
=eshell-buffer-maximum-lines= number of lines. For some reason I have
to use the =eshell-load-hook= instead of just relying on ~eshell.el~
and ~esh-mode.el~ being loaded because it seems that
=with-eval-after-load= loads this file before ~eshell.el~ is actually
loaded.

#+BEGIN_SRC emacs-lisp
  (defun oni:enable-truncating-eshell-buffers ()
    (add-to-list 'eshell-output-filter-functions 'eshell-truncate-buffer))

  (add-hook 'eshell-load-hook #'oni:enable-truncating-eshell-buffers)
#+END_SRC

Show the status of each command in the fringe of the eshell buffer.

#+BEGIN_SRC emacs-lisp
  (add-hook 'eshell-mode-hook 'eshell-fringe-status-mode)
#+END_SRC