Use eshell more fully

Emacs now starts on eshell by default. Also it uses xterm-colors package for
coloring, instead of default ansi-colors
This commit is contained in:
Mateus Pinto Rodrigues
2019-10-25 16:39:39 -03:00
parent 14182cb35b
commit 581464c7ae
3 changed files with 15 additions and 0 deletions

9
elisp/eshell-setup.el Normal file
View File

@@ -0,0 +1,9 @@
;; 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)))
(add-to-list 'eshell-preoutput-filter-functions 'xterm-color-filter)
(setq eshell-output-filter-functions
(remove 'eshell-handle-ansi-color eshell-output-filter-functions))

View File

@@ -38,6 +38,9 @@
(load "~/.emacs.d/elisp/openwith-setup.el"))
;; Programming environment
;; We need colors in eshell
(use-package xterm-color)
;; git
(use-package magit)

View File

@@ -1,3 +1,6 @@
;; Initialize emacs in eshell, not splash screen
(setq initial-buffer-choice (eshell))
;; Write custom set variables to different file
(setq custom-file "~/.emacs.d/elisp/custom.el")