mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-15 01:48:34 -07:00
feat(git): display tag in git-prompt when possible (#11318)
Co-authored-by: Marc Cornellà <hello@mcornella.com>
This commit is contained in:
parent
6df14641ac
commit
6dfc9b960f
@ -19,6 +19,7 @@ function git_prompt_info() {
|
|||||||
|
|
||||||
local ref
|
local ref
|
||||||
ref=$(__git_prompt_git symbolic-ref --short HEAD 2> /dev/null) \
|
ref=$(__git_prompt_git symbolic-ref --short HEAD 2> /dev/null) \
|
||||||
|
|| ref=$(__git_prompt_git describe --tags --exact-match HEAD 2> /dev/null) \
|
||||||
|| ref=$(__git_prompt_git rev-parse --short HEAD 2> /dev/null) \
|
|| ref=$(__git_prompt_git rev-parse --short HEAD 2> /dev/null) \
|
||||||
|| return 0
|
|| return 0
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user