diff options
author | romkatv <roman.perepelitsa@gmail.com> | 2019-02-27 22:32:29 +0300 |
---|---|---|
committer | romkatv <roman.perepelitsa@gmail.com> | 2019-02-27 22:32:29 +0300 |
commit | 46a4e1333ebeab910c38da8eebd5c1feef55d5bb (patch) | |
tree | 49101318b887bad8df1a22fee8d6959d928d6db2 /powerlevel9k.zsh-theme | |
parent | 405a66b3156653f2e7914a2f2b7251286cf374cb (diff) |
fix cache_key in vcs
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-x | powerlevel9k.zsh-theme | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index eaf1312b..f38479ca 100755 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -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" fi else - local info - info=$("${(@Q)${(z)POWERLEVEL9K_VCS_STATUS_COMMAND}}" 2>/dev/null) || return - local cache_key="$0 $info" + local props + props=("${(@fQ)$("${(@Q)${(z)POWERLEVEL9K_VCS_STATUS_COMMAND}}" 2>/dev/null)}") || return + local cache_key="$0 ${(@q)props}" if ! p9k_cache_get $cache_key; then - local -a props=("${(@fQ)${info}}") local local_branch=$props[1] local remote_branch=$props[2] local remote_url=$props[3] |