Skip to content

Instantly share code, notes, and snippets.

@natemccurdy
natemccurdy / .zshrc
Last active February 27, 2023 16:16
A Powerlevel10k prompt segment for your VAULT_ADDR
# Create a Powerlevel10k prompt segment that shows that value of $VAULT_ADDR if set.
function prompt_my_vault_addr() {
if [[ -n $VAULT_ADDR ]]; then
p10k segment -i '🔐' -f brightwhite -b blue -t "$VAULT_ADDR"
fi
}
# Add it to the right prompt.
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS+=my_vault_addr