mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-16 17:50:09 +00:00
Length of changeset-hash is now configurable by setting POWERLEVEL9K_CHANGESET_HASH_LENGTH.
This commit is contained in:
parent
863325e3d0
commit
3de82cfa67
1 changed files with 7 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue