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.
pull/1326/head
Ramon Lucas 4 years ago committed by GitHub
parent 58f5470cd9
commit d3de2e558c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -4496,7 +4496,8 @@ _p9k_gcloud_prefetch() {
if ! _p9k_cache_stat_get $0 ~/.config/gcloud/configurations/config_$P9K_GCLOUD_CONFIGURATION; then if ! _p9k_cache_stat_get $0 ~/.config/gcloud/configurations/config_$P9K_GCLOUD_CONFIGURATION; then
local pair account project_id local pair account project_id
pair="$(gcloud config configurations describe $P9K_GCLOUD_CONFIGURATION \ 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 (( ! $? )) && IFS=$'\1' read account project_id <<<$pair
_p9k_cache_stat_set "$account" "$project_id" _p9k_cache_stat_set "$account" "$project_id"
fi fi

Loading…
Cancel
Save