From 32b3a6398ca58e8e1112e34c26f3f84366e01cbf Mon Sep 17 00:00:00 2001 From: Ben Burwell Date: Fri, 8 May 2020 13:58:46 -0400 Subject: zsh: add $AWS_VAULT to prompt --- templates/.zsh/prompt.zsh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/templates/.zsh/prompt.zsh b/templates/.zsh/prompt.zsh index f98a73e..2e94acb 100644 --- a/templates/.zsh/prompt.zsh +++ b/templates/.zsh/prompt.zsh @@ -20,4 +20,15 @@ git_prompt() { fi } -export PROMPT='%F{blue}%~%f$(git_prompt) ' +dir_prompt() { + echo "%F{blue}%~%f" +} + +aws_vault_prompt() { + if [[ "${AWS_VAULT}" != "" ]] + then + echo "%F{red}${AWS_VAULT}%f " + fi +} + +export PROMPT='$(aws_vault_prompt)$(dir_prompt)$(git_prompt) ' -- cgit v1.2.3