1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-12-21 06:41:57 +00:00

Added POWERLEVEL9K_VCS_HIDE_TAGS variable to control displaying of vcs tags in segment

This commit is contained in:
Chris Hudson 2016-07-07 22:40:26 +01:00
parent 467742286f
commit ef2d01a2aa
2 changed files with 22 additions and 18 deletions

View file

@ -348,8 +348,10 @@ customization is provided via:
|`POWERLEVEL9K_SHOW_CHANGESET`|`false`|Set to `true` to display the hash / changeset in the segment.|
|`POWERLEVEL9K_CHANGESET_HASH_LENGTH`|`12`|How many characters of the hash / changeset to display in the segment.|
|`POWERLEVEL9K_VCS_SHOW_SUBMODULE_DIRTY`|`true`|Set to `false` to not reflect submodule status in the top-level repository prompt.|
|`POWERLEVEL9K_VCS_HIDE_TAGS`|unset|Set to `true` to stop tags being displayed in the segment.|
**vcs Symbols**
##### vcs symbols
The `vcs` segment uses various symbols to tell you the state of your repository.
These symbols depend on your installed font and selected `POWERLEVEL9K_MODE`

View file

@ -61,6 +61,7 @@ function +vi-git-remotebranch() {
}
function +vi-git-tagname() {
if [[ -z "${POWERLEVE9K_VCS_HIDE_TAGS}" ]]; then
# If we are on a tag, append the tagname to the current branch string.
local tag
tag=$(git describe --tags --exact-match HEAD 2>/dev/null)
@ -81,6 +82,7 @@ function +vi-git-tagname() {
hook_com[branch]+=" $(print_icon 'VCS_TAG_ICON')${tag}"
fi
fi
fi
}
# Show count of stashed changes