From 3c746082fed3543b06363c852a3e916b20a650e2 Mon Sep 17 00:00:00 2001 From: Tim Ysewyn Date: Sun, 4 Apr 2021 16:30:58 +0200 Subject: [PATCH] Support new gcloud CLI The configuration name now needs to be passed to `gcloud config configurations list` using the `--configuration` argument. --- internal/p10k.zsh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 8baf944e..38dbfff1 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -4504,7 +4504,10 @@ _p9k_gcloud_prefetch() { P9K_GCLOUD_CONFIGURATION=$_p9k__ret if ! _p9k_cache_stat_get $0 ~/.config/gcloud/configurations/config_$P9K_GCLOUD_CONFIGURATION; then local pair account project_id - pair="$(gcloud config configurations list $P9K_GCLOUD_CONFIGURATION \ + pair="$(gcloud config configurations list --configuration $P9K_GCLOUD_CONFIGURATION \ + --format=$'value[separator="\1"](properties.core.account,properties.core.project)' \ + --filter=is_active:true 2>/dev/null)" + (( $? )) && pair="$(gcloud config configurations list $P9K_GCLOUD_CONFIGURATION \ --format=$'value[separator="\1"](properties.core.account,properties.core.project)' \ --filter=is_active:true)" (( ! $? )) && IFS=$'\1' read account project_id <<<$pair