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

All top-level usages of "local" removed. That variables need to be global for antigen and prezto to work correctly.

This commit is contained in:
Dominik Ritter 2015-06-13 00:26:18 +02:00
parent 1e7105918d
commit fe5ef3cee8

View file

@ -179,8 +179,8 @@ else
DEFAULT_COLOR_DARK="236" DEFAULT_COLOR_DARK="236"
fi fi
local VCS_FOREGROUND_COLOR=$DEFAULT_COLOR VCS_FOREGROUND_COLOR=$DEFAULT_COLOR
local VCS_FOREGROUND_COLOR_DARK=$DEFAULT_COLOR_DARK VCS_FOREGROUND_COLOR_DARK=$DEFAULT_COLOR_DARK
# If user has defined custom colors for the `vcs` segment, override the defaults # If user has defined custom colors for the `vcs` segment, override the defaults
if [[ -n $POWERLEVEL9K_VCS_FOREGROUND ]]; then if [[ -n $POWERLEVEL9K_VCS_FOREGROUND ]]; then
@ -197,8 +197,8 @@ fi
setopt prompt_subst setopt prompt_subst
autoload -Uz vcs_info autoload -Uz vcs_info
local VCS_WORKDIR_DIRTY=false VCS_WORKDIR_DIRTY=false
local VCS_CHANGESET_PREFIX='' VCS_CHANGESET_PREFIX=''
if [[ "$POWERLEVEL9K_SHOW_CHANGESET" == true ]]; then if [[ "$POWERLEVEL9K_SHOW_CHANGESET" == true ]]; then
# Default: Just display the first 12 characters of our changeset-ID. # Default: Just display the first 12 characters of our changeset-ID.
local VCS_CHANGESET_HASH_LENGTH=12 local VCS_CHANGESET_HASH_LENGTH=12
@ -212,7 +212,7 @@ 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
local 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"