mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-22 12:20:07 +00:00
remove git from POWERLEVEL9K_VCS_BACKENDS if there is no git command
This commit is contained in:
parent
6e120b9eec
commit
d75147503e
1 changed files with 3 additions and 4 deletions
|
@ -7044,6 +7044,7 @@ _p9k_init_params() {
|
||||||
_p9k_declare -F POWERLEVEL9K_VCS_MAX_SYNC_LATENCY_SECONDS 0.02
|
_p9k_declare -F POWERLEVEL9K_VCS_MAX_SYNC_LATENCY_SECONDS 0.02
|
||||||
(( POWERLEVEL9K_VCS_MAX_SYNC_LATENCY_SECONDS >= 0 )) || (( POWERLEVEL9K_VCS_MAX_SYNC_LATENCY_SECONDS = 0 ))
|
(( POWERLEVEL9K_VCS_MAX_SYNC_LATENCY_SECONDS >= 0 )) || (( POWERLEVEL9K_VCS_MAX_SYNC_LATENCY_SECONDS = 0 ))
|
||||||
_p9k_declare -a POWERLEVEL9K_VCS_BACKENDS -- git
|
_p9k_declare -a POWERLEVEL9K_VCS_BACKENDS -- git
|
||||||
|
(( $+commands[git] )) || _POWERLEVEL9K_VCS_BACKENDS=(${_POWERLEVEL9K_VCS_BACKENDS:#git})
|
||||||
_p9k_declare -b POWERLEVEL9K_VCS_DISABLE_GITSTATUS_FORMATTING 0
|
_p9k_declare -b POWERLEVEL9K_VCS_DISABLE_GITSTATUS_FORMATTING 0
|
||||||
_p9k_declare -i POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY -1
|
_p9k_declare -i POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY -1
|
||||||
_p9k_declare -i POWERLEVEL9K_VCS_STAGED_MAX_NUM 1
|
_p9k_declare -i POWERLEVEL9K_VCS_STAGED_MAX_NUM 1
|
||||||
|
@ -7717,7 +7718,7 @@ _p9k_must_init() {
|
||||||
[[ $sig == $_p9k__param_sig ]] && return 1
|
[[ $sig == $_p9k__param_sig ]] && return 1
|
||||||
_p9k_deinit
|
_p9k_deinit
|
||||||
fi
|
fi
|
||||||
_p9k__param_pat=$'v94\1'${(q)ZSH_VERSION}$'\1'${(q)ZSH_PATCHLEVEL}$'\1'
|
_p9k__param_pat=$'v95\1'${(q)ZSH_VERSION}$'\1'${(q)ZSH_PATCHLEVEL}$'\1'
|
||||||
_p9k__param_pat+=$'${#parameters[(I)POWERLEVEL9K_*]}\1${(%):-%n%#}\1$GITSTATUS_LOG_LEVEL\1'
|
_p9k__param_pat+=$'${#parameters[(I)POWERLEVEL9K_*]}\1${(%):-%n%#}\1$GITSTATUS_LOG_LEVEL\1'
|
||||||
_p9k__param_pat+=$'$GITSTATUS_ENABLE_LOGGING\1$GITSTATUS_DAEMON\1$GITSTATUS_NUM_THREADS\1'
|
_p9k__param_pat+=$'$GITSTATUS_ENABLE_LOGGING\1$GITSTATUS_DAEMON\1$GITSTATUS_NUM_THREADS\1'
|
||||||
_p9k__param_pat+=$'$GITSTATUS_CACHE_DIR\1$GITSTATUS_AUTO_INSTALL\1${ZLE_RPROMPT_INDENT:-1}\1'
|
_p9k__param_pat+=$'$GITSTATUS_CACHE_DIR\1$GITSTATUS_AUTO_INSTALL\1${ZLE_RPROMPT_INDENT:-1}\1'
|
||||||
|
@ -7969,9 +7970,7 @@ function _p9k_init_cacheable() {
|
||||||
}
|
}
|
||||||
|
|
||||||
_p9k_init_vcs() {
|
_p9k_init_vcs() {
|
||||||
_p9k_segment_in_use vcs || return
|
if ! _p9k_segment_in_use vcs || (( ! $#_POWERLEVEL9K_VCS_BACKENDS )); then
|
||||||
if [[ $#_POWERLEVEL9K_VCS_BACKENDS -le 1 && $_POWERLEVEL9K_VCS_BACKENDS == git &&
|
|
||||||
$+commands[git] == 0 ]]; then
|
|
||||||
(( $+functions[gitstatus_stop_p9k_] )) && gitstatus_stop_p9k_ POWERLEVEL9K
|
(( $+functions[gitstatus_stop_p9k_] )) && gitstatus_stop_p9k_ POWERLEVEL9K
|
||||||
unset _p9k_preinit
|
unset _p9k_preinit
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue