added AWS profile display to agnoster theme

This commit is contained in:
Eugene Brodsky 2014-10-15 15:05:25 -04:00
parent 96e4e5dd03
commit 6e600de6f9

View File

@ -166,6 +166,15 @@ prompt_status() {
[[ -n "$symbols" ]] && prompt_segment black default "$symbols" [[ -n "$symbols" ]] && prompt_segment black default "$symbols"
} }
#AWS Profile
prompt_aws() {
local aws_profile=$AWS_DEFAULT_PROFILE
if [[ -n $aws_profile ]];
then
prompt_segment red white "AWS: $aws_profile"
fi
}
## Main prompt ## Main prompt
build_prompt() { build_prompt() {
RETVAL=$? RETVAL=$?
@ -175,6 +184,7 @@ build_prompt() {
prompt_dir prompt_dir
prompt_git prompt_git
prompt_hg prompt_hg
prompt_aws
prompt_end prompt_end
} }