Files
emacs.d/elisp/eshell-setup.el
Mateus Rodrigues b8262f7e82 hooks for eshell
2023-11-27 12:10:50 +00:00

24 lines
813 B
EmacsLisp

;; colors in eshell
(add-hook 'eshell-mode-hook
(lambda ()
(setenv "TERM" "xterm-256color")))
(add-hook 'eshell-before-prompt-hook (lambda ()
(setq xterm-color-preserve-properties t)))
(require 'esh-mode)
(add-to-list 'eshell-preoutput-filter-functions 'xterm-color-filter)
(setq eshell-output-filter-functions
(remove 'eshell-handle-ansi-color eshell-output-filter-functions))
;; Don't cycle through history with <up> and <down>
;; Those keys were previously bound to:
;; eshell-previous-matching-input-from-input and
;; eshell-next-matching-input-from-input, respectively
(defun my-eshell-setup ()
(progn
(define-key eshell-hist-mode-map (kbd "<up>") nil)
(define-key eshell-hist-mode-map (kbd "<down>") nil)))
(add-hook 'eshell-mode-hook #'my-eshell-setup)