mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2026-09-23 05:14:38 +00:00
DETACHED_HEAD handling
This commit is contained in:
@@ -61,10 +61,12 @@ function +vi-git-remotebranch() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function +vi-git-tagname() {
|
function +vi-git-tagname() {
|
||||||
|
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)
|
||||||
[[ -n "${tag}" ]] && hook_com[branch]+=" $(print_icon 'VCS_TAG_ICON')${tag}"
|
[[ -n "${tag}" ]] && hook_com[branch]+=" $(print_icon 'VCS_TAG_ICON')${tag}"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Show count of stashed changes
|
# Show count of stashed changes
|
||||||
|
|||||||
Reference in New Issue
Block a user