summaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorromkatv <roman.perepelitsa@gmail.com>2020-02-14 13:04:34 +0300
committerromkatv <roman.perepelitsa@gmail.com>2020-02-14 13:04:34 +0300
commit4f7efdcc8b288f61094ea384dfb0faddb46290cf (patch)
treeff1928e6a3a895cb1ec72f258605bfa7410a1730 /internal
parent63183dea4bc3870a5414d542b2efb2467b0399fa (diff)
bug fix: detect gcloud config changes when using non-default configs
Diffstat (limited to 'internal')
-rw-r--r--internal/p10k.zsh7
1 files changed, 4 insertions, 3 deletions
diff --git a/internal/p10k.zsh b/internal/p10k.zsh
index c6d1304e..ccd75625 100644
--- a/internal/p10k.zsh
+++ b/internal/p10k.zsh
@@ -4106,9 +4106,10 @@ _p9k_prompt_azure_init() {
}
prompt_gcloud() {
- # TODO: Use `gcloud config configurations list` instead.
unset P9K_GCLOUD_PROJECT P9K_GCLOUD_ACCOUNT
- if ! _p9k_cache_stat_get $0 ~/.config/gcloud/active_config ~/.config/gcloud/configurations/config_default; then
+ _p9k_read_word ~/.config/gcloud/active_config || return
+ if ! _p9k_cache_stat_get $0 ~/.config/gcloud/configurations/config_$_p9k__ret; then
+ # TODO: Use `gcloud config configurations list` instead.
_p9k_cache_stat_set "$(gcloud config get-value account 2>/dev/null)" "$(gcloud config get-value project 2>/dev/null)"
fi
[[ -n $_p9k__cache_val[1] || -n $_p9k__cache_val[2] ]] || return
@@ -6960,7 +6961,7 @@ _p9k_must_init() {
[[ $sig == $_p9k__param_sig ]] && return 1
_p9k_deinit
fi
- _p9k__param_pat=$'v45\1'${ZSH_VERSION}$'\1'${ZSH_PATCHLEVEL}$'\1'
+ _p9k__param_pat=$'v46\1'${ZSH_VERSION}$'\1'${ZSH_PATCHLEVEL}$'\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+=$'$DEFAULT_USER\1${ZLE_RPROMPT_INDENT:-1}\1$P9K_SSH\1$__p9k_ksh_arrays'