This commit is contained in:
pvincent
2021-03-01 20:13:12 +04:00
parent b714645054
commit 8b290f9f91
+3 -3
View File
@@ -111,14 +111,14 @@ __prompt_command() {
local tag_release=$(git describe --tags | cut -d'-' -f1) local tag_release=$(git describe --tags | cut -d'-' -f1)
local dirty=$(git status -s | wc -l) local dirty=$(git status -s | wc -l)
if [[ $dirty -ne 0 ]]; then if [[ $dirty -ne 0 ]]; then
PS1+="⚡|${tag_release}${Mag}…$dirty" PS1+="⚡|${tag_release}${Red}…$dirty"
else else
local ahead=$(git rev-list --branches --not --remotes |wc -l) local ahead=$(git rev-list --branches --not --remotes |wc -l)
if [[ $ahead -ne 0 ]]; then if [[ $ahead -ne 0 ]]; then
PS1+="⚡|${Blu}${tag_release}${Yel}↑${ahead}" PS1+="⚡|${tag_release}${Yel}↑${ahead}"
else else
if [[ -z $tag_release ]];then if [[ -z $tag_release ]];then
PS1+="${Red}✔" PS1+="${Blu}✔"
else else
PS1+="${Gre}✔${R}|${Blu}${tag_release}" PS1+="${Gre}✔${R}|${Blu}${tag_release}"
fi fi