mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-11 00:00:06 +00:00
fix cache_key in vcs
This commit is contained in:
parent
405a66b315
commit
46a4e1333e
1 changed files with 3 additions and 4 deletions
|
@ -1784,11 +1784,10 @@ prompt_vcs() {
|
||||||
"$1_prompt_segment" "${0}_${(U)current_state}" "$2" "${vcs_states[$current_state]}" "$DEFAULT_COLOR" "$vcs_prompt" "$vcs_visual_identifier"
|
"$1_prompt_segment" "${0}_${(U)current_state}" "$2" "${vcs_states[$current_state]}" "$DEFAULT_COLOR" "$vcs_prompt" "$vcs_visual_identifier"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
local info
|
local props
|
||||||
info=$("${(@Q)${(z)POWERLEVEL9K_VCS_STATUS_COMMAND}}" 2>/dev/null) || return
|
props=("${(@fQ)$("${(@Q)${(z)POWERLEVEL9K_VCS_STATUS_COMMAND}}" 2>/dev/null)}") || return
|
||||||
local cache_key="$0 $info"
|
local cache_key="$0 ${(@q)props}"
|
||||||
if ! p9k_cache_get $cache_key; then
|
if ! p9k_cache_get $cache_key; then
|
||||||
local -a props=("${(@fQ)${info}}")
|
|
||||||
local local_branch=$props[1]
|
local local_branch=$props[1]
|
||||||
local remote_branch=$props[2]
|
local remote_branch=$props[2]
|
||||||
local remote_url=$props[3]
|
local remote_url=$props[3]
|
||||||
|
|
Loading…
Reference in a new issue