1
0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2025-01-19 04:47:40 +02:00

DETACHED_HEAD handling

This commit is contained in:
Niccolò Maggioni 2016-03-22 17:51:01 +01:00
parent b46a96a7ce
commit 89fefbdf6e
No known key found for this signature in database
GPG Key ID: 4874B0C841E33264

View File

@ -61,10 +61,12 @@ function +vi-git-remotebranch() {
}
function +vi-git-tagname() {
if [[ -n "$(git status | grep 'HEAD detached')" ]] ; then
local tag
tag=$(git describe --tags --exact-match HEAD 2>/dev/null)
[[ -n "${tag}" ]] && hook_com[branch]+=" $(print_icon 'VCS_TAG_ICON')${tag}"
fi
}
# Show count of stashed changes