Skip to content

Commit

Permalink
feat(aws-plugin): added aws profile in prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
ThamosIO committed Jan 27, 2017
1 parent d3b6c49 commit f707299
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions bullet-train.zsh-theme
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ if [ ! -n "${BULLETTRAIN_PROMPT_ORDER+1}" ]; then
ruby
virtualenv
nvm
aws
go
git
hg
Expand Down Expand Up @@ -103,6 +104,20 @@ if [ ! -n "${BULLETTRAIN_NVM_PREFIX+1}" ]; then
BULLETTRAIN_NVM_PREFIX=""
fi

# AWS
if [ ! -n "${BULLETTRAIN_AWS_SHOW+1}" ]; then
BULLETTRAIN_AWS_SHOW=true
fi
if [ ! -n "${BULLETTRAIN_AWS_BG+1}" ]; then
BULLETTRAIN_AWS_BG=red
fi
if [ ! -n "${BULLETTRAIN_AWS_FG+1}" ]; then
BULLETTRAIN_AWS_FG=white
fi
if [ ! -n "${BULLETTRAIN_AWS_PREFIX+1}" ]; then
BULLETTRAIN_AWS_PREFIX="☁️ "
fi

# RUBY
if [ ! -n "${BULLETTRAIN_RUBY_BG+1}" ]; then
BULLETTRAIN_RUBY_BG=magenta
Expand Down Expand Up @@ -494,6 +509,19 @@ prompt_nvm() {
prompt_segment $BULLETTRAIN_NVM_BG $BULLETTRAIN_NVM_FG $BULLETTRAIN_NVM_PREFIX$nvm_prompt
}

# AWS Profile
prompt_aws() {
if [[ $BULLETTRAIN_AWS_SHOW == false ]]; then
return
fi

local aws_profile="$AWS_DEFAULT_PROFILE"

if [[ -n "$aws_profile" ]]; then
prompt_segment $BULLETTRAIN_AWS_BG $BULLETTRAIN_AWS_FG $BULLETTRAIN_AWS_PREFIX$aws_profile
fi
}

prompt_time() {
if [[ $BULLETTRAIN_TIME_12HR == true ]]; then
prompt_segment $BULLETTRAIN_TIME_BG $BULLETTRAIN_TIME_FG %D{%r}
Expand Down

0 comments on commit f707299

Please sign in to comment.