Skip to content

Instantly share code, notes, and snippets.

@pysysops
Last active October 26, 2023 09:52
Show Gist options
  • Save pysysops/b0fd78aa52629f321034289af042be24 to your computer and use it in GitHub Desktop.
Save pysysops/b0fd78aa52629f321034289af042be24 to your computer and use it in GitHub Desktop.
Powerlevel10k custom prompt config for use with aws-vault https://github.com/99designs/aws-vault
##############[ custom_awsvault: current aws account (https://github.com/99designs/aws-vault) ]###############
awsvault_prompt() {
if [ ! -z "${AWS_VAULT-}" ]; then
echo -n " ${AWS_VAULT-} "
fi
}
typeset -g POWERLEVEL9K_CUSTOM_AWSVAULT="awsvault_prompt"
typeset -g POWERLEVEL9K_CUSTOM_AWSVAULT_FOREGROUND="black"
typeset -g POWERLEVEL9K_CUSTOM_AWSVAULT_BACKGROUND="yellow"
typeset -g POWERLEVEL9K_CUSTOM_AWSVAULT_VISUAL_IDENTIFIER_EXPANSION=' ☁️'
@zmingxie
Copy link

Hello @pysysops, I was brought to this gist when I googled "powerlevel10k aws-vault" earlier. 😄

However, I can't seem to get this custom prompt working, and I'm curious if it's because I'm running aws-vault v6.1.0.

If you have a moment, could you confirm which version of aws-vault you are using? Thanks in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment