 (defun +eshell/switch (buffer)
   "Interactively switch to another eshell buffer."
   (interactive
-   (let ((buffers (cl-remove-if-not (lambda (buf) (eq (buffer-local-value 'major-mode buf) 'eshell-mode))
-                                    (delete (current-buffer) (ring-elements +eshell-buffers)))))
+   (let ((buffers (doom-buffers-in-mode
+                   'eshell-mode (delq (current-buffer) (ring-elements +eshell-buffers)))))
      (if (not buffers)
          (user-error "No eshell buffers are available")
        (list (completing-read

  (concat (if (bobp) "" "\n")
          (propertize (abbreviate-file-name (shrink-path-file (eshell/pwd)))
                      'face '+eshell-prompt-pwd)
          (propertize (+eshell--current-git-branch) 'face '+eshell-prompt-git-branch)
          (propertize " λ " 'face '+eshell-prompt-char)))


;;

;;; emacs/eshell/autoload/eshell.el -*- lexical-binding: t; -*-

;;;###autoload
(defface +eshell-prompt-pwd '((t :inherit font-lock-constant-face))
  "TODO"
  :group 'eshell)

;;;###autoload
(defface +eshell-prompt-git-branch '((t :inherit font-lock-builtin-face))
  "TODO"
  :group 'eshell)

