mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-22 12:20:07 +00:00
don't leak 'state' local parameter
This commit is contained in:
parent
2c135dd631
commit
83d80fa308
1 changed files with 3 additions and 3 deletions
|
@ -1160,7 +1160,7 @@ function _p9k_parse_aws_config() {
|
||||||
# AWS Profile
|
# AWS Profile
|
||||||
prompt_aws() {
|
prompt_aws() {
|
||||||
typeset -g P9K_AWS_PROFILE="${AWS_VAULT:-${AWSUME_PROFILE:-${AWS_PROFILE:-$AWS_DEFAULT_PROFILE}}}"
|
typeset -g P9K_AWS_PROFILE="${AWS_VAULT:-${AWSUME_PROFILE:-${AWS_PROFILE:-$AWS_DEFAULT_PROFILE}}}"
|
||||||
local pat class
|
local pat class state
|
||||||
for pat class in "${_POWERLEVEL9K_AWS_CLASSES[@]}"; do
|
for pat class in "${_POWERLEVEL9K_AWS_CLASSES[@]}"; do
|
||||||
if [[ $P9K_AWS_PROFILE == ${~pat} ]]; then
|
if [[ $P9K_AWS_PROFILE == ${~pat} ]]; then
|
||||||
[[ -n $class ]] && state=_${${(U)class}//İ/I}
|
[[ -n $class ]] && state=_${${(U)class}//İ/I}
|
||||||
|
@ -4536,7 +4536,7 @@ prompt_azure() {
|
||||||
fi
|
fi
|
||||||
_p9k_cache_stat_set "$name"
|
_p9k_cache_stat_set "$name"
|
||||||
fi
|
fi
|
||||||
local pat class
|
local pat class state
|
||||||
for pat class in "${_POWERLEVEL9K_AZURE_CLASSES[@]}"; do
|
for pat class in "${_POWERLEVEL9K_AZURE_CLASSES[@]}"; do
|
||||||
if [[ $name == ${~pat} ]]; then
|
if [[ $name == ${~pat} ]]; then
|
||||||
[[ -n $class ]] && state=_${${(U)class}//İ/I}
|
[[ -n $class ]] && state=_${${(U)class}//İ/I}
|
||||||
|
@ -4873,7 +4873,7 @@ function prompt_terraform() {
|
||||||
_p9k_read_word ${${TF_DATA_DIR:-.terraform}:A}/environment && ws=$_p9k__ret
|
_p9k_read_word ${${TF_DATA_DIR:-.terraform}:A}/environment && ws=$_p9k__ret
|
||||||
fi
|
fi
|
||||||
[[ -z $ws || $ws == default && $_POWERLEVEL9K_TERRAFORM_SHOW_DEFAULT == 0 ]] && return
|
[[ -z $ws || $ws == default && $_POWERLEVEL9K_TERRAFORM_SHOW_DEFAULT == 0 ]] && return
|
||||||
local pat class
|
local pat class state
|
||||||
for pat class in "${_POWERLEVEL9K_TERRAFORM_CLASSES[@]}"; do
|
for pat class in "${_POWERLEVEL9K_TERRAFORM_CLASSES[@]}"; do
|
||||||
if [[ $ws == ${~pat} ]]; then
|
if [[ $ws == ${~pat} ]]; then
|
||||||
[[ -n $class ]] && state=_${${(U)class}//İ/I}
|
[[ -n $class ]] && state=_${${(U)class}//İ/I}
|
||||||
|
|
Loading…
Reference in a new issue