Fix #2401: erroneous git ref display in eshell prompt
This commit is contained in:
parent
1e91c04c04
commit
1f04bc919f
1 changed files with 7 additions and 2 deletions
|
@ -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 ()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue