Browse Source

GIT_SYMBOL

main
pvincent 8 months ago
parent
commit
6eaf258fef
  1. 6
      bash.bashrc

6
bash.bashrc

@ -14,6 +14,8 @@ function __prompt_command {
local DIVERGENT_GIT_SYMBOL="${Yel}➾${R}"
local SYNCHRONIZED_GIT_SYMBOL="${Gre}✔${R}"
local PUSHED_NEEDED_SYMBOL='⥱'
local TAG_NEEDED_SYMBOL='⤽'
# set xterm title
echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"
@ -82,7 +84,7 @@ function __prompt_command {
ahead=$(git rev-list --branches --not --remotes | wc -l)
if [[ $ahead -ne 0 ]]; then
PS1+="${DIVERGENT_GIT_SYMBOL}|${tag_release}${Cya}↶${ahead}"
PS1+="${DIVERGENT_GIT_SYMBOL}|${tag_release}${Yel}${PUSHED_NEEDED_SYMBOL}${ahead}"
else
if [[ -z $tag_release ]]; then
PS1+="${SYNCHRONIZED_GIT_SYMBOL}"
@ -91,7 +93,7 @@ function __prompt_command {
commit_ahead=$(git log "$tag_release"..HEAD --oneline | wc -l)
if [[ $commit_ahead -gt 0 ]]; then
PS1+="${DIVERGENT_GIT_SYMBOL}|${tag_release}${Yel}↟${commit_ahead}"
PS1+="${DIVERGENT_GIT_SYMBOL}|${tag_release}${Cya}${TAG_NEEDED_SYMBOL}${commit_ahead}"
else
PS1+="${SYNCHRONIZED_GIT_SYMBOL}|${Cya}${tag_release}"
fi

Loading…
Cancel
Save