From af119c9406de68b91a6231114caa8b23bcfa8243 Mon Sep 17 00:00:00 2001 From: James Bowman Date: Tue, 8 Dec 2015 22:33:01 -0800 Subject: Adding command prompt for AWS Elastic Beanstalk environment name. --- powerlevel9k.zsh-theme | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'powerlevel9k.zsh-theme') 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() { -- cgit v1.2.3 From eba3a3ca95c5bc742ae42e89c9269d5070fb03a6 Mon Sep 17 00:00:00 2001 From: Dominik Ritter Date: Sun, 17 Jan 2016 12:38:18 +0100 Subject: Reworked the AWS Elastic Beanstalk segment. --- powerlevel9k.zsh-theme | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'powerlevel9k.zsh-theme') diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index 6ac25d77..f8e75b33 100755 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -291,9 +291,10 @@ prompt_aws() { # 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" + local eb_env=$(grep environment .elasticbeanstalk/config.yml 2> /dev/null | awk '{print $2}') + + if [[ -n "$eb_env" ]]; then + "$1_prompt_segment" "$0" "$2" black green "$eb_env" 'AWS_EB_ICON' fi } -- cgit v1.2.3