Add AWS profile to prompt
This commit is contained in:
parent
5d9c199ce9
commit
e7994f3a49
|
@ -148,7 +148,15 @@ prompt_dir() {
|
||||||
prompt_virtualenv() {
|
prompt_virtualenv() {
|
||||||
local virtualenv_path="$VIRTUAL_ENV"
|
local virtualenv_path="$VIRTUAL_ENV"
|
||||||
if [[ -n $virtualenv_path && -n $VIRTUAL_ENV_DISABLE_PROMPT ]]; then
|
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
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -188,6 +196,7 @@ build_prompt() {
|
||||||
#RETVAL=$?
|
#RETVAL=$?
|
||||||
#prompt_status
|
#prompt_status
|
||||||
prompt_virtualenv
|
prompt_virtualenv
|
||||||
|
prompt_aws
|
||||||
prompt_context
|
prompt_context
|
||||||
prompt_dir
|
prompt_dir
|
||||||
# prompt_tf
|
# prompt_tf
|
||||||
|
|
Loading…
Reference in New Issue