mirror of
https://github.com/Cornelicorn/bullet-train.zsh.git
synced 2025-12-06 03:40:41 +01:00
Merge pull request #199 from ThamosIO/feat/aws-profile-in-prompt
feat(aws-plugin): added aws profile in prompt
This commit is contained in:
11
README.md
11
README.md
@@ -187,6 +187,17 @@ NOTE: You do not need to specify *end* segment - it will be added automatically.
|
|||||||
|`BULLETTRAIN_GO_FG`|`white`|Foreground color
|
|`BULLETTRAIN_GO_FG`|`white`|Foreground color
|
||||||
|`BULLETTRAIN_GO_PREFIX`|`go`|Prefix of the segment
|
|`BULLETTRAIN_GO_PREFIX`|`go`|Prefix of the segment
|
||||||
|
|
||||||
|
### 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
|
||||||
|
|`BULLETTRAIN_AWS_FG`|`black`|Foreground color
|
||||||
|
|`BULLETTRAIN_AWS_PREFIX`|`☁️`|Prefix of the segment
|
||||||
|
|
||||||
### Perl
|
### Perl
|
||||||
|
|
||||||
|Variable|Default|Meaning
|
|Variable|Default|Meaning
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ if [ ! -n "${BULLETTRAIN_PROMPT_ORDER+1}" ]; then
|
|||||||
ruby
|
ruby
|
||||||
virtualenv
|
virtualenv
|
||||||
nvm
|
nvm
|
||||||
|
aws
|
||||||
go
|
go
|
||||||
elixir
|
elixir
|
||||||
git
|
git
|
||||||
@@ -104,6 +105,17 @@ if [ ! -n "${BULLETTRAIN_NVM_PREFIX+1}" ]; then
|
|||||||
BULLETTRAIN_NVM_PREFIX="⬡ "
|
BULLETTRAIN_NVM_PREFIX="⬡ "
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# AWS
|
||||||
|
if [ ! -n "${BULLETTRAIN_AWS_BG+1}" ]; then
|
||||||
|
BULLETTRAIN_AWS_BG=yellow
|
||||||
|
fi
|
||||||
|
if [ ! -n "${BULLETTRAIN_AWS_FG+1}" ]; then
|
||||||
|
BULLETTRAIN_AWS_FG=black
|
||||||
|
fi
|
||||||
|
if [ ! -n "${BULLETTRAIN_AWS_PREFIX+1}" ]; then
|
||||||
|
BULLETTRAIN_AWS_PREFIX="☁️"
|
||||||
|
fi
|
||||||
|
|
||||||
# RUBY
|
# RUBY
|
||||||
if [ ! -n "${BULLETTRAIN_RUBY_BG+1}" ]; then
|
if [ ! -n "${BULLETTRAIN_RUBY_BG+1}" ]; then
|
||||||
BULLETTRAIN_RUBY_BG=red
|
BULLETTRAIN_RUBY_BG=red
|
||||||
@@ -517,6 +529,15 @@ prompt_nvm() {
|
|||||||
prompt_segment $BULLETTRAIN_NVM_BG $BULLETTRAIN_NVM_FG $BULLETTRAIN_NVM_PREFIX$nvm_prompt
|
prompt_segment $BULLETTRAIN_NVM_BG $BULLETTRAIN_NVM_FG $BULLETTRAIN_NVM_PREFIX$nvm_prompt
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#AWS Profile
|
||||||
|
prompt_aws() {
|
||||||
|
local spaces=" "
|
||||||
|
|
||||||
|
if [[ -n "$AWS_PROFILE" ]]; then
|
||||||
|
prompt_segment $BULLETTRAIN_AWS_BG $BULLETTRAIN_AWS_FG $BULLETTRAIN_AWS_PREFIX$spaces$AWS_PROFILE
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
prompt_time() {
|
prompt_time() {
|
||||||
if [[ $BULLETTRAIN_TIME_12HR == true ]]; then
|
if [[ $BULLETTRAIN_TIME_12HR == true ]]; then
|
||||||
prompt_segment $BULLETTRAIN_TIME_BG $BULLETTRAIN_TIME_FG %D{%r}
|
prompt_segment $BULLETTRAIN_TIME_BG $BULLETTRAIN_TIME_FG %D{%r}
|
||||||
|
|||||||
Reference in New Issue
Block a user