mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-12 08:10:07 +00:00
Merging ability to hide tags from VCS segment.
This commit is contained in:
parent
b893d66a46
commit
3291b4d476
2 changed files with 22 additions and 21 deletions
|
@ -348,7 +348,7 @@ customization is provided via:
|
||||||
|`POWERLEVEL9K_SHOW_CHANGESET`|`false`|Set to `true` to display the hash / changeset in the segment.|
|
|`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_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_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.|
|
|`POWERLEVEL9K_VCS_HIDE_TAGS`|`false`|Set to `true` to stop tags being displayed in the segment.|
|
||||||
|
|
||||||
|
|
||||||
##### vcs symbols
|
##### vcs symbols
|
||||||
|
|
|
@ -60,8 +60,9 @@ function +vi-git-remotebranch() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set_default POWERLEVEL9K_VCS_HIDE_TAGS false
|
||||||
function +vi-git-tagname() {
|
function +vi-git-tagname() {
|
||||||
if [[ -z "${POWERLEVE9K_VCS_HIDE_TAGS}" ]]; then
|
if [[ "$POWERLEVE9K_VCS_HIDE_TAGS" == "false" ]]; then
|
||||||
# If we are on a tag, append the tagname to the current branch string.
|
# If we are on a tag, append the tagname to the current branch string.
|
||||||
local tag
|
local tag
|
||||||
tag=$(git describe --tags --exact-match HEAD 2>/dev/null)
|
tag=$(git describe --tags --exact-match HEAD 2>/dev/null)
|
||||||
|
|
Loading…
Reference in a new issue