                return buf)
       (generate-new-buffer +eshell-buffer-name)))
 
-;;;###autoload
-(defun +eshell-prompt ()
-  "Generate the prompt string for eshell. Use for `eshell-prompt-function'."
-  (concat (propertize (abbreviate-file-name (eshell/pwd)) 'face '+eshell-prompt-pwd)
-          (propertize (+eshell--current-git-branch) 'face '+eshell-prompt-git-branch)
-          (propertize " λ " 'face '+eshell-prompt-char)))
-
 
 ;;
 ;; Commands

;;
;; Library
;;

(defun +eshell--add-buffer (buf)
  (ring-remove+insert+extend +eshell-buffers buf))

(defun +eshell--remove-buffer (buf)
  (when-let* ((idx (ring-member +eshell-buffers buf)))
    (ring-remove +eshell-buffers idx)))

(defun +eshell--current-git-branch ()
  (let ((branch (car (cl-loop for match in (split-string (shell-command-to-string "git branch") "\n")

;; Hooks
;;

(defun +eshell--add-buffer (buf)
  (ring-remove+insert+extend +eshell-buffers buf))

(defun +eshell--remove-buffer (buf)
  (when-let* ((idx (ring-member +eshell-buffers buf)))
    (ring-remove +eshell-buffers idx)))

;;;###autoload
(defun +eshell|init ()
  "Keep track of eshell buffers."
  (let ((buf (current-buffer)))
    (dolist (buf (ring-elements +eshell-buffers))
      (unless (buffer-live-p buf)
        (+eshell--remove-buffer buf)))
