mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-12-19 05:51:57 +00:00
DETACHED_HEAD handling
This commit is contained in:
parent
b46a96a7ce
commit
89fefbdf6e
1 changed files with 2 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue