mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
Fix #2401: erroneous git ref display in eshell prompt
This commit is contained in:
@ -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 ()
|
||||
|
Reference in New Issue
Block a user