diff options
author | ZYX <yuxz@amazon.com> | 2023-05-12 02:42:30 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-12 11:42:30 +0200 |
commit | f01eea76da194fef6005f53a281b6f5a998db126 (patch) | |
tree | fdc11cc8804596d2df80232450533fdfd0dd5e91 /plugins/aws/aws.plugin.zsh | |
parent | aab3bfff9f27a261dcd4cd4a2082a2ce3fff8c59 (diff) | |
download | zsh-f01eea76da194fef6005f53a281b6f5a998db126.tar.gz zsh-f01eea76da194fef6005f53a281b6f5a998db126.tar.bz2 zsh-f01eea76da194fef6005f53a281b6f5a998db126.zip |
fix(aws): use the correct variable to assert region is defined (#11691)
Diffstat (limited to 'plugins/aws/aws.plugin.zsh')
-rw-r--r-- | plugins/aws/aws.plugin.zsh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/aws/aws.plugin.zsh b/plugins/aws/aws.plugin.zsh index b2415b737..c946515be 100644 --- a/plugins/aws/aws.plugin.zsh +++ b/plugins/aws/aws.plugin.zsh @@ -224,12 +224,12 @@ function aws_prompt_info() { local _aws_to_show local region="${AWS_REGION:-${AWS_DEFAULT_REGION:-$AWS_PROFILE_REGION}}" - if [[ -n $AWS_PROFILE ]];then + if [[ -n "$AWS_PROFILE" ]];then _aws_to_show+="${ZSH_THEME_AWS_PROFILE_PREFIX="<aws:"}${AWS_PROFILE}${ZSH_THEME_AWS_PROFILE_SUFFIX=">"}" fi - if [[ -n $AWS_REGION ]]; then - [[ -n $AWS_PROFILE ]] && _aws_to_show+="${ZSH_THEME_AWS_DIVIDER=" "}" + if [[ -n "$region" ]]; then + [[ -n "$_aws_to_show" ]] && _aws_to_show+="${ZSH_THEME_AWS_DIVIDER=" "}" _aws_to_show+="${ZSH_THEME_AWS_REGION_PREFIX="<region:"}${region}${ZSH_THEME_AWS_REGION_SUFFIX=">"}" fi |