Created
December 18, 2019 00:04
-
-
Save lucis/179b9c49cda4001fa5fb6339c728030d to your computer and use it in GitHub Desktop.
VTEX + Zsh integration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TOOLBELT_CFG_FILE="$HOME/.config/configstore/vtex.json" | |
parse_vtex_json() { | |
cat "$TOOLBELT_CFG_FILE" | grep $1 | sed -n "s/^.*\"$1\": \"\(.*\)\".*$/\1/p" | |
} | |
get_vtex_account() { | |
parse_vtex_json "account" | |
} | |
get_vtex_workspace() { | |
parse_vtex_json "workspace" | |
} | |
POWERLEVEL9K_CUSTOM_VTEX="[[ -e 'manifest.json' ]] && echo -e '$(get_vtex_workspace)/$(get_vtex_account)'" | |
POWERLEVEL9K_CUSTOM_VTEX_BACKGROUND="198" | |
POWERLEVEL9K_CUSTOM_VTEX_FOREGROUND="white" | |
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(context dir vcs custom_vtex) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment