aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Bowman <jamebowm@amazon.com>2015-12-09 09:33:01 +0300
committerDominik Ritter <dritter03@googlemail.com>2016-01-23 03:34:01 +0300
commitaf119c9406de68b91a6231114caa8b23bcfa8243 (patch)
tree0fecb1f97f1280a7c50b05edb1ace2786e06d079
parent472fb6f674d315f372bc3480b2f1aba8d772a680 (diff)
Adding command prompt for AWS Elastic Beanstalk environment name.
-rw-r--r--functions/icons.zsh3
-rwxr-xr-xpowerlevel9k.zsh-theme8
2 files changed, 11 insertions, 0 deletions
diff --git a/functions/icons.zsh b/functions/icons.zsh
index aad62dc1..403802aa 100644
--- a/functions/icons.zsh
+++ b/functions/icons.zsh
@@ -29,6 +29,7 @@ case $POWERLEVEL9K_MODE in
ROOT_ICON $'\UE801' # 
RUBY_ICON $'\UE847 ' # 
AWS_ICON $'\UE895' # 
+ AWS_EB_ICON $'\U1F331' # 🌱
BACKGROUND_JOBS_ICON $'\UE82F ' # 
TEST_ICON $'\UE891' # 
TODO_ICON $'\U2611' # ☑
@@ -82,6 +83,7 @@ case $POWERLEVEL9K_MODE in
ROOT_ICON $'\uF201' # 
RUBY_ICON $'\UF219 ' # 
AWS_ICON $'\UF296' # 
+ AWS_EB_ICON $'\U1F331' # 🌱
BACKGROUND_JOBS_ICON $'\UF013 ' # 
TEST_ICON $'\UF291' # 
TODO_ICON $'\U2611' # ☑
@@ -130,6 +132,7 @@ case $POWERLEVEL9K_MODE in
ROOT_ICON $'\u26A1' # ⚡
RUBY_ICON ''
AWS_ICON 'AWS:'
+ AWS_EB_ICON $'\U1F331' # 🌱
BACKGROUND_JOBS_ICON $'\u2699' # ⚙
TEST_ICON ''
TODO_ICON $'\U2611' # ☑
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index 6f34b94c..6ac25d77 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -289,6 +289,14 @@ prompt_aws() {
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.
set_default POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE true
prompt_background_jobs() {