mirror of https://github.com/nkoehring/configs.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
458 B
Plaintext
23 lines
458 B
Plaintext
if [ -n "$__CURRENT_GIT_BRANCH" ]; then
|
|
local p=""
|
|
local s=""
|
|
p+="$__CURRENT_GIT_BRANCH"
|
|
case "$__CURRENT_GIT_BRANCH_STATUS" in
|
|
ahead)
|
|
s+="↑"
|
|
;;
|
|
diverged)
|
|
s+="↕"
|
|
;;
|
|
behind)
|
|
s+="↓"
|
|
;;
|
|
esac
|
|
if [ -n "$__CURRENT_GIT_BRANCH_IS_DIRTY" ]; then
|
|
s+="⚡"
|
|
fi
|
|
|
|
printf "(%s%s)" "%{${fg[yellow]}%} $p %{${PR_LIGHT_RED}%}" "$s%{${terminfo[sgr0]}%}"
|
|
fi
|
|
|