spacing in git prompt
This commit is contained in:
parent
354bb1f5a4
commit
1d2baa4784
1 changed files with 5 additions and 5 deletions
|
|
@ -22,24 +22,24 @@ parse_git_branch() {
|
|||
remote_pattern="# Your branch is (.*) of"
|
||||
diverge_pattern="# Your branch and (.*) have diverged"
|
||||
if [[ ! ${git_status} =~ "nothing to commit" ]]; then
|
||||
state="${RED}!"
|
||||
state=" ${RED}!"
|
||||
else
|
||||
state=""
|
||||
fi
|
||||
# add an else if or two here if you want to get more specific
|
||||
if [[ ${git_status} =~ ${remote_pattern} ]]; then
|
||||
if [[ ${BASH_REMATCH[1]} == "ahead" ]]; then
|
||||
remote="${YELLOW}↑"
|
||||
remote=" ${YELLOW}↑"
|
||||
else
|
||||
remote="${YELLOW}↓"
|
||||
remote=" ${YELLOW}↓"
|
||||
fi
|
||||
fi
|
||||
if [[ ${git_status} =~ ${diverge_pattern} ]]; then
|
||||
remote="${YELLOW}↕"
|
||||
remote=" ${YELLOW}↕"
|
||||
fi
|
||||
if [[ ${git_status} =~ ${branch_pattern} ]]; then
|
||||
branch=${BASH_REMATCH[1]}
|
||||
echo " $RED(${branch} ${remote}${state}$RED) "
|
||||
echo " $RED(${branch}${remote}${state}$RED) "
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue