mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-13 08:30:08 +00:00
Documentation
This commit is contained in:
parent
89fefbdf6e
commit
4fdf5df258
1 changed files with 3 additions and 0 deletions
|
@ -61,10 +61,13 @@ function +vi-git-remotebranch() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function +vi-git-tagname() {
|
function +vi-git-tagname() {
|
||||||
|
# Only show the tag name if we are not in DETACHED_HEAD state,
|
||||||
|
# since in that case it would already be displayed in the branch segment
|
||||||
if [[ -n "$(git status | grep 'HEAD detached')" ]] ; then
|
if [[ -n "$(git status | grep 'HEAD detached')" ]] ; then
|
||||||
local tag
|
local tag
|
||||||
|
|
||||||
tag=$(git describe --tags --exact-match HEAD 2>/dev/null)
|
tag=$(git describe --tags --exact-match HEAD 2>/dev/null)
|
||||||
|
# Append the tag segment to the branch one
|
||||||
[[ -n "${tag}" ]] && hook_com[branch]+=" $(print_icon 'VCS_TAG_ICON')${tag}"
|
[[ -n "${tag}" ]] && hook_com[branch]+=" $(print_icon 'VCS_TAG_ICON')${tag}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue