Last active
October 31, 2022 07:36
-
-
Save tyhopp/61f1284647c952fc3ed8b7e6c72f851b to your computer and use it in GitHub Desktop.
zshrc-prompt
This file contains 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
parse_git_branch() { | |
git branch 2> /dev/null | sed -n -e 's/^\* \(.*\)/[\1]/p' | |
} | |
COLOR_DEF='%f' | |
COLOR_USR='%F{243}' | |
COLOR_DIR='%F{197}' | |
COLOR_GIT='%F{39}' | |
NEWLINE=$'\n' | |
setopt PROMPT_SUBST | |
export PROMPT='${COLOR_USR}%n@%m ${COLOR_DIR}%1d ${COLOR_GIT}$(parse_git_branch)${COLOR_DEF}${NEWLINE}%% ' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment