         (format " [%s]" (substring branch 2))
       "")))
 
-;;;###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)))
+(defun +eshell-delete-window ()
+  (if (one-window-p)
+      (unless (doom-real-buffer-p (progn (previous-buffer) (current-buffer)))
+        (switch-to-buffer (doom-fallback-buffer)))
+    (delete-window)))
 
 (defun +eshell-get-or-create-buffer ()
   (or (cl-loop for buf in (ring-elements +eshell-buffers)

    (delete-char arg)))

;;;###autoload
(defun +eshell/split ()
  (interactive)
  (select-window (split-window-vertically))
  (+eshell/open))

;;;###autoload
(defun +eshell/vsplit ()
  (interactive)
  (select-window (split-window-horizontally))
  (+eshell/open))

               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
