diff options
author | Dominik Ritter <dritter03@googlemail.com> | 2016-01-17 14:38:18 +0300 |
---|---|---|
committer | Dominik Ritter <dritter03@googlemail.com> | 2016-01-23 03:35:53 +0300 |
commit | eba3a3ca95c5bc742ae42e89c9269d5070fb03a6 (patch) | |
tree | b84804cc1d2a55b63659905e1197c0a8ba2d1d5d /powerlevel9k.zsh-theme | |
parent | 6763826c4e131797b2c86c3e14cab0eb954e6e82 (diff) |
Reworked the AWS Elastic Beanstalk segment.
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-x | powerlevel9k.zsh-theme | 7 |
1 files changed, 4 insertions, 3 deletions
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 } |