diff options
author | Ben Hilburn <bhilburn@gmail.com> | 2015-04-02 01:40:54 +0300 |
---|---|---|
committer | Ben Hilburn <bhilburn@gmail.com> | 2015-04-02 01:40:54 +0300 |
commit | 5b0eeadabb75c03fb4e63442294d0b8d25897db5 (patch) | |
tree | 728ba675d80b57b95123ef8883c9873c492bcbc8 /powerlevel9k.zsh-theme | |
parent | c88cfb8b73f7884c7861d32c118cfe6294980ff0 (diff) | |
parent | e23a3c47c41557ec97ea0a819070fd2c4bdb3b68 (diff) |
Merge pull request #17 from dritter/dritter/changeset_hash_length
Make changeset hash length configurable
Diffstat (limited to 'powerlevel9k.zsh-theme')
-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 86c16ecb..c8a9ac89 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" == true ]]; 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}%0.$VCS_CHANGESET_HASH_LENGTH""i@%f" fi zstyle ':vcs_info:*' enable git hg |