1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-11-13 16:40:08 +00:00

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.
This commit is contained in:
Ramon Lucas 2021-03-27 05:16:50 -03:00 committed by GitHub
parent 58f5470cd9
commit d3de2e558c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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