summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbcochofel <bruno.cochofel@gmail.com>2021-02-21 21:02:14 +0300
committerGitHub <noreply@github.com>2021-02-21 21:02:14 +0300
commit6a7115b35b42b127ce4e2a8735396a844acd492b (patch)
treed5d33f9c77db64552434ef09dcafe02fef3cde55
parentb816abfed0e8785d8bc2e47987cc40f6bcd4bc29 (diff)
add azure classes (#1274)
-rw-r--r--internal/p10k.zsh10
1 files changed, 9 insertions, 1 deletions
diff --git a/internal/p10k.zsh b/internal/p10k.zsh
index 9dffb547..43fa8336 100644
--- a/internal/p10k.zsh
+++ b/internal/p10k.zsh
@@ -4459,8 +4459,15 @@ prompt_azure() {
fi
_p9k_cache_stat_set "$name"
fi
+ local pat class
+ for pat class in "${_POWERLEVEL9K_AZURE_CLASSES[@]}"; do
+ if [[ $name == ${~pat} ]]; then
+ [[ -n $class ]] && state=_${${(U)class}//İ/I}
+ break
+ fi
+ done
[[ -n $_p9k__cache_val[1] ]] || return
- _p9k_prompt_segment "$0" "blue" "white" "AZURE_ICON" 0 '' "${_p9k__cache_val[1]//\%/%%}"
+ _p9k_prompt_segment "$0$state" "blue" "white" "AZURE_ICON" 0 '' "${_p9k__cache_val[1]//\%/%%}"
}
_p9k_prompt_azure_init() {
@@ -7312,6 +7319,7 @@ _p9k_init_params() {
# POWERLEVEL9K_KUBECONTEXT_OTHER_BACKGROUND=yellow
_p9k_declare -a POWERLEVEL9K_KUBECONTEXT_CLASSES --
_p9k_declare -a POWERLEVEL9K_AWS_CLASSES --
+ _p9k_declare -a POWERLEVEL9K_AZURE_CLASSES --
_p9k_declare -a POWERLEVEL9K_TERRAFORM_CLASSES --
_p9k_declare -b POWERLEVEL9K_TERRAFORM_SHOW_DEFAULT 0
_p9k_declare -a POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES -- 'service_account:*' SERVICE_ACCOUNT