1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-12-18 05:40:07 +00:00

Fix the branch icon and whitespaces in the vcs segment.

This commit is contained in:
Dominik Ritter 2015-07-10 00:43:10 +02:00
parent 772c9ab85d
commit 0226f871f6
2 changed files with 17 additions and 17 deletions

View file

@ -288,11 +288,11 @@ set `POWERLEVEL9K_CHANGESET_HASH_LENGTH` to any value you want.
# just show the 6 first characters of changeset # just show the 6 first characters of changeset
POWERLEVEL9K_CHANGESET_HASH_LENGTH=6 POWERLEVEL9K_CHANGESET_HASH_LENGTH=6
You can also enable an additional branch icon in your prompt by setting You can also disable the branch icon in your prompt by setting
`POWERLEVEL9K_SHOW_BRANCH_ICON` to `true`: `POWERLEVEL9K_HIDE_BRANCH_ICON` to `true`:
# Show an icon before the branch name # Hide the branch icon
POWERLEVEL9K_SHOW_BRANCH_ICON=true POWERLEVEL9K_HIDE_BRANCH_ICON=true
##### Symbols ##### Symbols

View file

@ -75,7 +75,7 @@ case $POWERLEVEL9K_MODE in
VCS_TAG_ICON="\uE817 " #  VCS_TAG_ICON="\uE817 " # 
VCS_BOOKMARK_ICON="\uE87B" #  VCS_BOOKMARK_ICON="\uE87B" # 
VCS_COMMIT_ICON="\uE821 " #  VCS_COMMIT_ICON="\uE821 " # 
VCS_BRANCH_ICON=" \uE220" #  VCS_BRANCH_ICON="\uE220" # 
VCS_REMOTE_BRANCH_ICON="\uE804" #  VCS_REMOTE_BRANCH_ICON="\uE804" # 
VCS_GIT_ICON="\uE20E " #  VCS_GIT_ICON="\uE20E " # 
VCS_HG_ICON="\uE1C3 " #  VCS_HG_ICON="\uE1C3 " # 
@ -131,7 +131,7 @@ case $POWERLEVEL9K_MODE in
VCS_TAG_ICON="\uE817 " #  VCS_TAG_ICON="\uE817 " # 
VCS_BOOKMARK_ICON="\uE87B" #  VCS_BOOKMARK_ICON="\uE87B" # 
VCS_COMMIT_ICON="\uE821 " #  VCS_COMMIT_ICON="\uE821 " # 
VCS_BRANCH_ICON=" \uE220" #  VCS_BRANCH_ICON="\uE220" # 
VCS_REMOTE_BRANCH_ICON="\uE804" #  VCS_REMOTE_BRANCH_ICON="\uE804" # 
VCS_GIT_ICON="\uE20E " #  VCS_GIT_ICON="\uE20E " # 
VCS_HG_ICON="\uE1C3 " #  VCS_HG_ICON="\uE1C3 " # 
@ -158,14 +158,14 @@ case $POWERLEVEL9K_MODE in
VCS_TAG_ICON='' VCS_TAG_ICON=''
VCS_BOOKMARK_ICON="\u263F" # ☿ VCS_BOOKMARK_ICON="\u263F" # ☿
VCS_COMMIT_ICON='' VCS_COMMIT_ICON=''
VCS_BRANCH_ICON='@' VCS_BRANCH_ICON="\uE0A0 " # 
VCS_REMOTE_BRANCH_ICON="\u2192" # → VCS_REMOTE_BRANCH_ICON="\u2192" # →
VCS_GIT_ICON="\uE0A0" #  VCS_GIT_ICON=""
VCS_HG_ICON="\uE0A0" #  VCS_HG_ICON=""
;; ;;
esac esac
if [[ "$POWERLEVEL9K_SHOW_BRANCH_ICON" != true ]]; then if [[ "$POWERLEVEL9K_HIDE_BRANCH_ICON" == true ]]; then
VCS_BRANCH_ICON='' VCS_BRANCH_ICON=''
fi fi
@ -210,15 +210,15 @@ if [[ "$POWERLEVEL9K_SHOW_CHANGESET" == true ]]; then
VCS_CHANGESET_HASH_LENGTH="$POWERLEVEL9K_CHANGESET_HASH_LENGTH" VCS_CHANGESET_HASH_LENGTH="$POWERLEVEL9K_CHANGESET_HASH_LENGTH"
fi fi
VCS_CHANGESET_PREFIX="%F{$VCS_FOREGROUND_COLOR_DARK}$VCS_COMMIT_ICON%0.$VCS_CHANGESET_HASH_LENGTH""i%f" VCS_CHANGESET_PREFIX="%F{$VCS_FOREGROUND_COLOR_DARK}$VCS_COMMIT_ICON%0.$VCS_CHANGESET_HASH_LENGTH""i%f "
fi fi
zstyle ':vcs_info:*' enable git hg zstyle ':vcs_info:*' enable git hg
zstyle ':vcs_info:*' check-for-changes true zstyle ':vcs_info:*' check-for-changes true
VCS_DEFAULT_FORMAT="$VCS_CHANGESET_PREFIX%F{$VCS_FOREGROUND_COLOR}%b%c%u%m%f" VCS_DEFAULT_FORMAT="$VCS_CHANGESET_PREFIX%F{$VCS_FOREGROUND_COLOR}%b%c%u%m%f"
zstyle ':vcs_info:git:*' formats "%F{$VCS_FOREGROUND_COLOR}$VCS_GIT_ICON%f $VCS_DEFAULT_FORMAT" zstyle ':vcs_info:git:*' formats "%F{$VCS_FOREGROUND_COLOR}$VCS_GIT_ICON%f$VCS_DEFAULT_FORMAT"
zstyle ':vcs_info:hg:*' formats "%F{$VCS_FOREGROUND_COLOR}$VCS_HG_ICON%f $VCS_DEFAULT_FORMAT" zstyle ':vcs_info:hg:*' formats "%F{$VCS_FOREGROUND_COLOR}$VCS_HG_ICON%f$VCS_DEFAULT_FORMAT"
zstyle ':vcs_info:*' actionformats " %b %F{red}| %a%f" zstyle ':vcs_info:*' actionformats " %b %F{red}| %a%f"