From 70aa6f1f7226b4b09095998c12c72a1bb22a6e47 Mon Sep 17 00:00:00 2001 From: Thomas Raimond Date: Wed, 19 Apr 2017 17:22:31 +0200 Subject: [PATCH] refacto(awsprofile): useless var removed --- README.md | 3 +++ bullet-train.zsh-theme | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5f97a79..0169c8c 100644 --- a/README.md +++ b/README.md @@ -180,6 +180,9 @@ NOTE: You do not need to specify *end* segment - it will be added automatically. ### AWS Profile +Displays which AWS (Amazon Web Services) credentials profile is currently set. +This environment var is used by aws-cli and other tools to use the right access keys and other parameters. + |Variable|Default|Meaning |--------|-------|-------| |`BULLETTRAIN_AWS_BG`|`yellow`|Background color diff --git a/bullet-train.zsh-theme b/bullet-train.zsh-theme index 2ebdf30..33dc424 100644 --- a/bullet-train.zsh-theme +++ b/bullet-train.zsh-theme @@ -506,12 +506,12 @@ prompt_nvm() { prompt_segment $BULLETTRAIN_NVM_BG $BULLETTRAIN_NVM_FG $BULLETTRAIN_NVM_PREFIX$nvm_prompt } +#AWS Profile prompt_aws() { - local aws_profile="$AWS_PROFILE" local spaces=" " - if [[ -n "$aws_profile" ]]; then - prompt_segment $BULLETTRAIN_AWS_BG $BULLETTRAIN_AWS_FG $BULLETTRAIN_AWS_PREFIX$spaces$aws_profile + if [[ -n "$AWS_PROFILE" ]]; then + prompt_segment $BULLETTRAIN_AWS_BG $BULLETTRAIN_AWS_FG $BULLETTRAIN_AWS_PREFIX$spaces$AWS_PROFILE fi }