1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-11-14 00:50:08 +00:00

check for gitstatus.plugin.zsh existence in preinit

This commit is contained in:
romkatv 2019-10-08 13:02:44 +02:00
parent 6cd22e24e2
commit d4cbe14f06

View file

@ -4585,16 +4585,17 @@ _p9k_init_vcs() {
(( threads <= 32 )) || threads=32 (( threads <= 32 )) || threads=32
fi fi
typeset -g _p9k_preinit="function _p9k_preinit() { typeset -g _p9k_preinit="function _p9k_preinit() {
source ${(q)gitstatus_dir}/gitstatus.plugin.zsh [[ -r ${(q)gitstatus_dir}/gitstatus.plugin.zsh ]] || return
GITSTATUS_DAEMON=${(q)daemon} GITSTATUS_NUM_THREADS=$threads \ source ${(q)gitstatus_dir}/gitstatus.plugin.zsh || return
GITSTATUS_LOG_LEVEL=${(q)GITSTATUS_LOG_LEVEL} \ GITSTATUS_DAEMON=${(q)daemon} GITSTATUS_NUM_THREADS=$threads \
GITSTATUS_ENABLE_LOGGING=${(q)GITSTATUS_ENABLE_LOGGING} gitstatus_start \ GITSTATUS_LOG_LEVEL=${(q)GITSTATUS_LOG_LEVEL} \
-s $_POWERLEVEL9K_VCS_STAGED_MAX_NUM \ GITSTATUS_ENABLE_LOGGING=${(q)GITSTATUS_ENABLE_LOGGING} gitstatus_start \
-u $_POWERLEVEL9K_VCS_UNSTAGED_MAX_NUM \ -s $_POWERLEVEL9K_VCS_STAGED_MAX_NUM \
-d $_POWERLEVEL9K_VCS_UNTRACKED_MAX_NUM \ -u $_POWERLEVEL9K_VCS_UNSTAGED_MAX_NUM \
-c $_POWERLEVEL9K_VCS_CONFLICTED_MAX_NUM \ -d $_POWERLEVEL9K_VCS_UNTRACKED_MAX_NUM \
-m $_POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY \ -c $_POWERLEVEL9K_VCS_CONFLICTED_MAX_NUM \
-a POWERLEVEL9K -m $_POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY \
-a POWERLEVEL9K
}" }"
source ${gitstatus_dir}/gitstatus.plugin.zsh source ${gitstatus_dir}/gitstatus.plugin.zsh
GITSTATUS_DAEMON=$daemon GITSTATUS_NUM_THREADS=$threads gitstatus_start \ GITSTATUS_DAEMON=$daemon GITSTATUS_NUM_THREADS=$threads gitstatus_start \