including DEFAULT/NONDEFAULT states for aws prompt

This commit is contained in:
Sergio Bruder 2019-03-30 00:52:37 -03:00
parent c8a3d5ba89
commit 3c01aba5a2
1 changed files with 5 additions and 1 deletions

View File

@ -333,7 +333,11 @@ prompt_anaconda() {
prompt_aws() {
local aws_profile="${AWS_PROFILE:-$AWS_DEFAULT_PROFILE}"
if [[ -n "$aws_profile" ]]; then
"$1_prompt_segment" "$0" "$2" red white 'AWS_ICON' 0 '' "${aws_profile//\%/%%}"
if [[ "$aws_profile" == "$POWERLEVEL9K_AWS_DEFAULT_PROFILE" ]]; then
"$1_prompt_segment" "$0_DEFAULT" "$2" "${DEFAULT_COLOR}" white 'AWS_ICON' 0 '' "${aws_profile//\%/%%}"
else
"$1_prompt_segment" "$0_NONDEFAULT" "$2" "${DEFAULT_COLOR}" white 'AWS_ICON' 0 '' "${aws_profile//\%/%%}"
fi
fi
}