I have recently decided to fully learn Git, and it has become unimaginably helpful in my everyday life.
I have customized my zsh profile to this currently: current zsh profile
Would it be possible, without installing any 3rd-party tools such as OhMyZsh, to display something next to the git_branch in the zsh profile in different colors for the status of a commit? Such as green text for a committed change, yellow for staged, and red for not staged?
I am on macOS.
Here is my current ~/.zshrc:
function parse_git_branch() {
git branch --show-current 2> /dev/null
}
setopt PROMPT_SUBST
export PROMPT='%F{cyan}%n%f %F{027}%1~%f %F{055}$(parse_git_branch)%f
%F{green}$%f '