summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRamon Lucas <ramon@ramonlucas.com>2021-03-27 11:16:50 +0300
committerGitHub <noreply@github.com>2021-03-27 11:16:50 +0300
commitd3de2e558cc12edc012a868ef11cd0dfb6d03a68 (patch)
tree8e477a10e307b50e1c92002239c31082e12b9b25
parent58f5470cd98343581853dafe2a99430c0a6975e5 (diff)
Sets the filter for the current gcloud profile (#1324)
When you have multiple profiles set up, you should only search for what is currently active.
-rw-r--r--internal/p10k.zsh3
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/p10k.zsh b/internal/p10k.zsh
index 17c3308b..e5f8be76 100644
--- a/internal/p10k.zsh
+++ b/internal/p10k.zsh
@@ -4496,7 +4496,8 @@ _p9k_gcloud_prefetch() {
if ! _p9k_cache_stat_get $0 ~/.config/gcloud/configurations/config_$P9K_GCLOUD_CONFIGURATION; then
local pair account project_id
pair="$(gcloud config configurations describe $P9K_GCLOUD_CONFIGURATION \
- --format=$'value[separator="\1"](properties.core.account,properties.core.project)')"
+ --format=$'value[separator="\1"](properties.core.account,properties.core.project)' \
+ --filter=is_active:true)"
(( ! $? )) && IFS=$'\1' read account project_id <<<$pair
_p9k_cache_stat_set "$account" "$project_id"
fi