Adding command prompt for AWS Elastic Beanstalk environment name.

pull/22/head
James Bowman 9 years ago committed by Dominik Ritter
parent 472fb6f674
commit af119c9406

@ -29,6 +29,7 @@ case $POWERLEVEL9K_MODE in
ROOT_ICON $'\UE801' #  ROOT_ICON $'\UE801' # 
RUBY_ICON $'\UE847 ' #  RUBY_ICON $'\UE847 ' # 
AWS_ICON $'\UE895' #  AWS_ICON $'\UE895' # 
AWS_EB_ICON $'\U1F331' # 🌱
BACKGROUND_JOBS_ICON $'\UE82F ' #  BACKGROUND_JOBS_ICON $'\UE82F ' # 
TEST_ICON $'\UE891' #  TEST_ICON $'\UE891' # 
TODO_ICON $'\U2611' # ☑ TODO_ICON $'\U2611' # ☑
@ -82,6 +83,7 @@ case $POWERLEVEL9K_MODE in
ROOT_ICON $'\uF201' #  ROOT_ICON $'\uF201' # 
RUBY_ICON $'\UF219 ' #  RUBY_ICON $'\UF219 ' # 
AWS_ICON $'\UF296' #  AWS_ICON $'\UF296' # 
AWS_EB_ICON $'\U1F331' # 🌱
BACKGROUND_JOBS_ICON $'\UF013 ' #  BACKGROUND_JOBS_ICON $'\UF013 ' # 
TEST_ICON $'\UF291' #  TEST_ICON $'\UF291' # 
TODO_ICON $'\U2611' # ☑ TODO_ICON $'\U2611' # ☑
@ -130,6 +132,7 @@ case $POWERLEVEL9K_MODE in
ROOT_ICON $'\u26A1' # ⚡ ROOT_ICON $'\u26A1' # ⚡
RUBY_ICON '' RUBY_ICON ''
AWS_ICON 'AWS:' AWS_ICON 'AWS:'
AWS_EB_ICON $'\U1F331' # 🌱
BACKGROUND_JOBS_ICON $'\u2699' # ⚙ BACKGROUND_JOBS_ICON $'\u2699' # ⚙
TEST_ICON '' TEST_ICON ''
TODO_ICON $'\U2611' # ☑ TODO_ICON $'\U2611' # ☑

@ -289,6 +289,14 @@ prompt_aws() {
fi fi
} }
# Current Elastic Beanstalk environment
prompt_aws_eb_env() {
if [ -e .elasticbeanstalk/config.yml ]; then
local eb_env=$(cat .elasticbeanstalk/config.yml | grep environment 2> /dev/null | awk '{print $2}')
"$1_prompt_segment" "$0" black green "$(print_icon 'AWS_EB_ICON') $eb_env"
fi
}
# Segment to indicate background jobs with an icon. # Segment to indicate background jobs with an icon.
set_default POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE true set_default POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE true
prompt_background_jobs() { prompt_background_jobs() {

Loading…
Cancel
Save