diff options
author | romkatv <roman.perepelitsa@gmail.com> | 2019-10-08 14:02:44 +0300 |
---|---|---|
committer | romkatv <roman.perepelitsa@gmail.com> | 2019-10-08 14:02:44 +0300 |
commit | d4cbe14f066720710fb75fef1fa8e558696345fb (patch) | |
tree | c934dc41f931dacb180403b6b9178cca78411fd7 /internal/p10k.zsh | |
parent | 6cd22e24e27003181b4b9878a91cc99c6d48eaf1 (diff) |
check for gitstatus.plugin.zsh existence in preinit
Diffstat (limited to 'internal/p10k.zsh')
-rwxr-xr-x | internal/p10k.zsh | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/internal/p10k.zsh b/internal/p10k.zsh index c20a1108..c6a5aff7 100755 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -4585,16 +4585,17 @@ _p9k_init_vcs() { (( threads <= 32 )) || threads=32 fi typeset -g _p9k_preinit="function _p9k_preinit() { - source ${(q)gitstatus_dir}/gitstatus.plugin.zsh - GITSTATUS_DAEMON=${(q)daemon} GITSTATUS_NUM_THREADS=$threads \ - GITSTATUS_LOG_LEVEL=${(q)GITSTATUS_LOG_LEVEL} \ - GITSTATUS_ENABLE_LOGGING=${(q)GITSTATUS_ENABLE_LOGGING} gitstatus_start \ - -s $_POWERLEVEL9K_VCS_STAGED_MAX_NUM \ - -u $_POWERLEVEL9K_VCS_UNSTAGED_MAX_NUM \ - -d $_POWERLEVEL9K_VCS_UNTRACKED_MAX_NUM \ - -c $_POWERLEVEL9K_VCS_CONFLICTED_MAX_NUM \ - -m $_POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY \ - -a POWERLEVEL9K + [[ -r ${(q)gitstatus_dir}/gitstatus.plugin.zsh ]] || return + source ${(q)gitstatus_dir}/gitstatus.plugin.zsh || return + GITSTATUS_DAEMON=${(q)daemon} GITSTATUS_NUM_THREADS=$threads \ + GITSTATUS_LOG_LEVEL=${(q)GITSTATUS_LOG_LEVEL} \ + GITSTATUS_ENABLE_LOGGING=${(q)GITSTATUS_ENABLE_LOGGING} gitstatus_start \ + -s $_POWERLEVEL9K_VCS_STAGED_MAX_NUM \ + -u $_POWERLEVEL9K_VCS_UNSTAGED_MAX_NUM \ + -d $_POWERLEVEL9K_VCS_UNTRACKED_MAX_NUM \ + -c $_POWERLEVEL9K_VCS_CONFLICTED_MAX_NUM \ + -m $_POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY \ + -a POWERLEVEL9K }" source ${gitstatus_dir}/gitstatus.plugin.zsh GITSTATUS_DAEMON=$daemon GITSTATUS_NUM_THREADS=$threads gitstatus_start \ |