mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-25 13:30:07 +00:00
don't fetch gitstatusd if there is no git
This commit is contained in:
parent
a28d45005e
commit
4635fcacee
1 changed files with 16 additions and 12 deletions
|
@ -6412,18 +6412,22 @@ _p9k_precmd_impl() {
|
||||||
ret=$?
|
ret=$?
|
||||||
fi
|
fi
|
||||||
if (( ret == 0 )); then
|
if (( ret == 0 )); then
|
||||||
(
|
if (( $+commands[git] )); then
|
||||||
local -i pid
|
(
|
||||||
{
|
local -i pid
|
||||||
{ /bin/sh "$__p9k_root_dir"/gitstatus/install </dev/null &>/dev/null & } && pid=$!
|
{
|
||||||
( builtin source "$__p9k_root_dir"/internal/wizard.zsh )
|
{ /bin/sh "$__p9k_root_dir"/gitstatus/install </dev/null &>/dev/null & } && pid=$!
|
||||||
} always {
|
( builtin source "$__p9k_root_dir"/internal/wizard.zsh )
|
||||||
if (( pid )); then
|
} always {
|
||||||
kill -- $pid 2>/dev/null
|
if (( pid )); then
|
||||||
wait -- $pid 2>/dev/null
|
kill -- $pid 2>/dev/null
|
||||||
fi
|
wait -- $pid 2>/dev/null
|
||||||
}
|
fi
|
||||||
)
|
}
|
||||||
|
)
|
||||||
|
else
|
||||||
|
( builtin source "$__p9k_root_dir"/internal/wizard.zsh )
|
||||||
|
fi
|
||||||
if (( $? )); then
|
if (( $? )); then
|
||||||
instant_prompt_disabled=1
|
instant_prompt_disabled=1
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue