         eshell-glob-case-insensitive t
         eshell-error-if-no-glob t)
 
-  (when (and (featurep! :completion company)
-             +eshell--company-backends)
-    (set-company-backend! 'eshell-mode +eshell--company-backends)
-    (add-hook 'eshell-mode-hook #'company-mode)
-    (setq-hook! 'eshell-mode-hook
-      company-idle-delay 0.1
-      company-frontends (cons 'company-tng-frontend company-frontends)))
-
   ;; Consider eshell buffers real
   (add-hook 'eshell-mode-hook #'doom-mark-buffer-as-real-h)
 

      ;; time `eshell-mode' is enabled. Why? It is not for us mere mortals to
      ;; grasp such wisdom.
      (map! :map eshell-mode-map
            (:unless (featurep! :completion company)
              :ig "TAB"     #'+eshell/pcomplete
              :ig [tab]     #'+eshell/pcomplete)
            :n "RET"     #'+eshell/goto-end-of-prompt
            :n [return]  #'+eshell/goto-end-of-prompt
            :n "c"       #'+eshell/evil-change

            [remap doom/backward-to-bol-or-indent] #'eshell-bol
            [remap doom/backward-kill-to-bol-and-indent] #'eshell-kill-input
            [remap evil-window-split]   #'+eshell/split-below
            [remap evil-window-vsplit]  #'+eshell/split-right))
    (defun +eshell-init-company-h ()
      (when (and (featurep! :completion company)
                 +eshell--company-backends)
        (company-mode +1)
        (setq-local company-backends +eshell--company-backends)
        (setq-local company-frontends (cons 'company-tng-frontend company-frontends))
        (let ((map eshell-mode-map))
          (define-key map (kbd "TAB") #'+company/complete)
          (define-key map [tab] #'+company/complete))
        (when (bound-and-true-p evil-local-mode)
          (evil-normalize-keymaps))))))


(use-package! eshell-up
