Commit 16bd29370dee

Vincent Demeester <vincent@sbr.pm>
2019-01-25 18:47:03
setup-shells: enhance eshell setup 👼
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent 255d6ce
Changed files (2)
lisp/setup-shells.el
@@ -82,10 +82,12 @@ The EShell is renamed to match that directory to make multiple windows easier."
   (add-hook
    'eshell-mode-hook
    (lambda ()
+     (eshell-smart-initialize)
+     (eshell-dirs-initialize)
      (bind-keys :map eshell-mode-map
                 ("C-c C-l"                . counsel-esh-history)
                 ([remap eshell-pcomplete] . completion-at-point))))
-
+  
   ;; Use system su/sudo
   (with-eval-after-load "em-unix"
     '(progn
@@ -116,6 +118,11 @@ The EShell is renamed to match that directory to make multiple windows easier."
   :ensure eshell
   :config (setq eshell-scroll-to-bottom-on-input 'all))
 
+(use-package em-smart
+  :ensure eshell)
+(use-package em-dirs
+  :ensure eshell)
+
 (use-package em-cmpl                    ; EShell TAB completion
   :ensure eshell
   :config
@@ -137,7 +144,22 @@ The EShell is renamed to match that directory to make multiple windows easier."
   (add-to-list 'eshell-visual-commands "htop")
   (add-to-list 'eshell-visual-commands "top")
   (add-to-list 'eshell-visual-commands "tail")
-  (add-to-list 'eshell-visual-commands "npm"))
+  (add-to-list 'eshell-visual-commands "npm")
+  (add-to-list 'eshell-visual-commands "ncdu"))
+
+(use-package em-banner
+  :ensure eshell
+  :config
+  (setq eshell-banner-message "
+  Welcome to the Emacs
+
+                         _/                  _/  _/
+      _/_/      _/_/_/  _/_/_/      _/_/    _/  _/
+   _/_/_/_/  _/_/      _/    _/  _/_/_/_/  _/  _/
+  _/            _/_/  _/    _/  _/        _/  _/
+   _/_/_/  _/_/_/    _/    _/    _/_/_/  _/  _/
+
+"))
 
 (use-package fish-completion            ; Add Fish completion to EShell
   :defer 2
init.el
@@ -119,6 +119,9 @@
    auto-save-file-name-transforms
    `((".*" ,(no-littering-expand-var-file-name "auto-save/") t))))
 
+(setenv "PAGER" "cat")
+(setenv "TERM" "eterm-color")
+
 (use-package server                     ; The server of `emacsclient'
   :config (or (server-running-p) (server-mode)))