diff options
author | Dominik Ritter <dritter03@googlemail.com> | 2015-03-31 01:52:06 +0300 |
---|---|---|
committer | Dominik Ritter <dritter03@googlemail.com> | 2015-03-31 01:57:01 +0300 |
commit | 3de82cfa67e782337d05aab774ea75106d67f992 (patch) | |
tree | 866dae1070caa1333f3532bbcb97254859c18a56 | |
parent | 863325e3d0317f65a7a0bb11fd44ef6483fe5fc2 (diff) |
Length of changeset-hash is now configurable by setting POWERLEVEL9K_CHANGESET_HASH_LENGTH.
-rw-r--r-- | powerlevel9k.zsh-theme | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index 55056bf1..d9e4485d 100644 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -53,8 +53,13 @@ autoload -Uz vcs_info local VCS_WORKDIR_DIRTY=false local VCS_CHANGESET_PREFIX='' if [ $POWERLEVEL9K_SHOW_CHANGESET ]; then - # Just display the first 12 characters of our changeset-ID. - VCS_CHANGESET_PREFIX="%F{$DEFAULT_COLOR_DARK}%12.12i@%f" + # 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" fi zstyle ':vcs_info:*' enable git hg |