Add AWS profile to prompt

This commit is contained in:
Pavle Portic 2021-10-10 02:21:05 +02:00
parent 5d9c199ce9
commit e7994f3a49
Signed by: TheEdgeOfRage
GPG Key ID: F2AB38285780DE3D
1 changed files with 10 additions and 1 deletions

View File

@ -148,7 +148,15 @@ prompt_dir() {
prompt_virtualenv() {
local virtualenv_path="$VIRTUAL_ENV"
if [[ -n $virtualenv_path && -n $VIRTUAL_ENV_DISABLE_PROMPT ]]; then
prompt_segment blue black "(`basename $virtualenv_path`)"
prompt_segment blue black ""
fi
}
# AWS profile
prompt_aws() {
local aws_profile="$AWS_PROFILE"
if [[ -n $aws_profile ]]; then
prompt_segment blue yellow "($aws_profile)"
fi
}
@ -188,6 +196,7 @@ build_prompt() {
#RETVAL=$?
#prompt_status
prompt_virtualenv
prompt_aws
prompt_context
prompt_dir
# prompt_tf