mirror of
https://github.com/akelge/zsh
synced 2025-07-04 13:39:07 +00:00
Added support for AWS profile to pure prompt
This commit is contained in:
@ -213,6 +213,11 @@ prompt_pure_precmd() {
|
||||
export VIRTUAL_ENV_DISABLE_PROMPT=12
|
||||
fi
|
||||
|
||||
psvar[13]=
|
||||
if [[ -n $AWS_PROFILE ]]; then
|
||||
psvar[13]="|${AWS_PROFILE}|"
|
||||
fi
|
||||
|
||||
# Make sure VIM prompt is reset.
|
||||
prompt_pure_reset_prompt_symbol
|
||||
|
||||
@ -733,6 +738,7 @@ prompt_pure_setup() {
|
||||
user 242
|
||||
user:root default
|
||||
virtualenv 242
|
||||
aws blue
|
||||
)
|
||||
prompt_pure_colors=("${(@kv)prompt_pure_colors_default}")
|
||||
|
||||
@ -751,6 +757,7 @@ prompt_pure_setup() {
|
||||
|
||||
# If a virtualenv is activated, display it in grey.
|
||||
PROMPT='%(12V.%F{$prompt_pure_colors[virtualenv]}%12v%f .)'
|
||||
PROMPT+='%(13V.%F{$prompt_pure_colors[aws]}%13v%f .)'
|
||||
|
||||
# Prompt turns red if the previous command didn't exit with 0.
|
||||
local prompt_indicator='%(?.%F{$prompt_pure_colors[prompt:success]}.%F{$prompt_pure_colors[prompt:error]})${prompt_pure_state[prompt]}%f '
|
||||
|
Reference in New Issue
Block a user