Skip to content

Instantly share code, notes, and snippets.

@bananita
Created April 20, 2022 11:29
Show Gist options
  • Save bananita/3594d7dda860fd55c3aa1159aad8dc6c to your computer and use it in GitHub Desktop.
Save bananita/3594d7dda860fd55c3aa1159aad8dc6c to your computer and use it in GitHub Desktop.
.zshrc
eval "$(rbenv init - zsh)"
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{197}'
COLOR_GIT=$'%F{39}'
setopt PROMPT_SUBST
export PROMPT='${COLOR_USR}%n ${COLOR_DIR}%2~ ${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