     (bind-key "C-l" #'ar/eshell-cd-to-parent eshell-mode-map)
     (bind-key "<backtab>" #'company-complete eshell-mode-map)
     (bind-key "<tab>" #'company-complete eshell-mode-map))
-
-  (add-hook #'eshell-mode-hook #'ar/eshell-mode-hook-function)
+  :hook (eshell-mode . ar/eshell-mode-hook-function)
+  :config
+  (use-package em-hist)
+  (use-package em-glob)
+  (use-package esh-mode)
+  (use-package em-dirs)
+  (use-package em-smart)
+
+  ;; Avoid "WARNING: terminal is not fully functional."
+  ;; http://mbork.pl/2018-06-10_Git_diff_in_Eshell
+  (setenv "PAGER" "cat")
+
+  (validate-setq eshell-where-to-jump 'begin)
+  (validate-setq eshell-review-quick-commands nil)
+  (validate-setq eshell-smart-space-goes-to-end t)
+
+  (validate-setq eshell-history-size (* 10 1024))
+  (validate-setq eshell-hist-ignoredups t)
+  (validate-setq eshell-error-if-no-glob t)
+  (validate-setq eshell-glob-case-insensitive t)
+  (validate-setq eshell-scroll-to-bottom-on-input 'all)
+  (validate-setq eshell-list-files-after-cd nil)
+
+  (add-hook 'eshell-mode-hook
+            (lambda ()
+              (add-to-list 'eshell-visual-commands "ssh")
+              (add-to-list 'eshell-visual-commands "tail")
+              (add-to-list 'eshell-visual-commands "top")))
+
+  (defun ar/eshell-cd-to-parent ()
+    (interactive)
+    (goto-char (point-max))
+    (insert "cd ..")
+    (eshell-send-input nil t))
 
   (use-package ar-eshell-config
     :after validate

  (dirs))

(use-package shell
  :commands shell-mode
  :init
  ;; (advice-add 'shell-directory-tracker
  ;;             :override
  ;;             'ar/shell-directory-tracker)
  (add-hook #'shell-mode-hook #'ar/shell-mode-hook-function))

;; ;; comint-magic-space needs to be whitelisted to ensure we still receive company-begin events.
;; (add-to-list 'company-begin-commands 'comint-magic-space)

      (smerge-mode +1))))

(use-package stripe-buffer :ensure t
  :after dired-mode
  :hook (dired-mode . turn-on-stripe-buffer-mode))

(use-package cl
  :init
