Created
March 23, 2023 18:56
-
-
Save diaswrd/5287af725ecb39f2f39880e97f6d6409 to your computer and use it in GitHub Desktop.
Pleasant green/purple font colors in ~/.zprofile for iterm2 (with git branch name)
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
# Set CLICOLOR if you want Ansi Colors in iTerm2 | |
export CLICOLOR=1 | |
# Set colors to match iTerm2 Terminal Colors | |
export TERM=xterm-256color | |
function parse_git_branch() { | |
git branch 2> /dev/null | sed -n -e 's/^\* \(.*\)/(\1)/p' | |
} | |
COLOR_DEF=$'%f' | |
COLOR_USR=$'%F{243}' | |
COLOR_DIR=$'%F{green}' | |
COLOR_GIT=$'%F{141}' | |
setopt PROMPT_SUBST | |
export PROMPT='${COLOR_USR}%n ${COLOR_DIR}%~ ${COLOR_GIT}$(parse_git_branch)${COLOR_DEF} $ ' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment