Skip to content

Instantly share code, notes, and snippets.

View lucassperez's full-sized avatar

Lucas Perez lucassperez

View GitHub Profile
@lucassperez
lucassperez / gist:bc04afa332c18ab708a084c1be1ff230
Created May 31, 2022 19:26
minimal zsh prompt with git colors
git_color() {
local git_status="$(git status 2> /dev/null)"
local output_styles=""
if [[ $git_status =~ "nothing to commit, working tree clean" ]]; then
# red
output_styles="9"
elif [[ $git_status =~ "nothing added to commit but untracked files present" ]]; then
# yellow
output_styles="11"