mirror of https://github.com/akelge/zsh
Added support for AWS profile to pure prompt
This commit is contained in:
parent
0b765c7973
commit
60134cdcd7
|
@ -1,2 +1,4 @@
|
|||
zsh.d/99-local.zsh
|
||||
zsh.d/Darwin/99-local.zsh
|
||||
*~
|
||||
*.swp
|
||||
|
|
|
@ -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 '
|
||||
|
|
Loading…
Reference in New Issue