mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-24 16:53:47 +01:00
feat(agnoster): add git tag to prompt (#8417)
Co-authored-by: Jakub Novotny <jakub.novotny@deutsche-boerse.com>
This commit is contained in:
parent
e564793939
commit
4188b22aea
@ -109,7 +109,9 @@ prompt_git() {
|
||||
if [[ "$(git rev-parse --is-inside-work-tree 2>/dev/null)" = "true" ]]; then
|
||||
repo_path=$(git rev-parse --git-dir 2>/dev/null)
|
||||
dirty=$(parse_git_dirty)
|
||||
ref=$(git symbolic-ref HEAD 2> /dev/null) || ref="➦ $(git rev-parse --short HEAD 2> /dev/null)"
|
||||
ref=$(git symbolic-ref HEAD 2> /dev/null) || \
|
||||
ref="◈ $(git describe --exact-match --tags HEAD 2> /dev/null)" || \
|
||||
ref="➦ $(git rev-parse --short HEAD 2> /dev/null)"
|
||||
if [[ -n $dirty ]]; then
|
||||
prompt_segment yellow black
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user