diff --git a/modules/term/eshell/autoload/prompts.el b/modules/term/eshell/autoload/prompts.el index 55e01fb62..0c1dd6a40 100644 --- a/modules/term/eshell/autoload/prompts.el +++ b/modules/term/eshell/autoload/prompts.el @@ -12,11 +12,16 @@ (defun +eshell--current-git-branch () + ;; TODO Refactor me (cl-destructuring-bind (status . output) - (doom-call-process "git" "name-rev" "--name-only" "HEAD") + (doom-call-process "git" "symbolic-ref" "-q" "--short" "HEAD") (if (equal status 0) (format " [%s]" output) - ""))) + (cl-destructuring-bind (status . output) + (doom-call-process "git" "describe" "--all" "--always" "HEAD") + (if (equal status 0) + (format " [%s]" output) + ""))))) ;;;###autoload (defun +eshell-default-prompt-fn ()