aboutsummaryrefslogtreecommitdiff
path: root/powerlevel9k.zsh-theme
diff options
context:
space:
mode:
authorDominik Ritter <dritter03@googlemail.com>2015-04-01 09:53:28 +0300
committerDominik Ritter <dritter03@googlemail.com>2015-04-01 09:53:28 +0300
commite23a3c47c41557ec97ea0a819070fd2c4bdb3b68 (patch)
tree728ba675d80b57b95123ef8883c9873c492bcbc8 /powerlevel9k.zsh-theme
parent32e6ebc88d3c71a02e6f90638accce076a08fec9 (diff)
Show at maximum the configured amount of characters. If the changeset id
exeeds that limit, just show the full changeset id.
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rw-r--r--powerlevel9k.zsh-theme10
1 files changed, 5 insertions, 5 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index ef4bac9b..c8a9ac89 100644
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -55,11 +55,11 @@ local VCS_CHANGESET_PREFIX=''
if [[ "$POWERLEVEL9K_SHOW_CHANGESET" == true ]]; then
# Default: Just display the first 12 characters of our changeset-ID.
local VCS_CHANGESET_HASH_LENGTH=12
- if [[ -n $POWERLEVEL9K_CHANGESET_HASH_LENGTH ]]; then
- VCS_CHANGESET_HASH_LENGTH=$POWERLEVEL9K_CHANGESET_HASH_LENGTH
- fi
-
- VCS_CHANGESET_PREFIX="%F{$DEFAULT_COLOR_DARK}%$VCS_CHANGESET_HASH_LENGTH.$VCS_CHANGESET_HASH_LENGTH""i@%f"
+ if [[ -n $POWERLEVEL9K_CHANGESET_HASH_LENGTH ]]; then
+ VCS_CHANGESET_HASH_LENGTH=$POWERLEVEL9K_CHANGESET_HASH_LENGTH
+ fi
+
+ VCS_CHANGESET_PREFIX="%F{$DEFAULT_COLOR_DARK}%0.$VCS_CHANGESET_HASH_LENGTH""i@%f"
fi
zstyle ':vcs_info:*' enable git hg