Browse Source

up blue

master 0.9.4
pvincent 4 years ago
parent
commit
9d50c810fc
  1. 5
      bash.bashrc

5
bash.bashrc

@ -107,14 +107,15 @@ __prompt_command() {
local branch=$(git branch 2> /dev/null | grep -e ^* | cut -d ' ' -f2)
PS1+=" ${R}[${Mag}${branch}${R}|"
local tag_release=`git describe --exact-match --tags $(git log -n1 --pretty='%h') 2> /dev/null`
#local tag_release=`git describe --exact-match --tags $(git log -n1 --pretty='%h') 2> /dev/null`
local tag_release=$(git describe --tags | cut -d'-' -f1)
local dirty=$(git status -s | wc -l)
if [[ $dirty -ne 0 ]]; then
PS1+="${Mag}⚡|${tag_release}…$dirty"
else
local ahead=$(git rev-list --branches --not --remotes |wc -l)
if [[ $ahead -ne 0 ]]; then
PS1+="${Blu}⚡|${tag_release}↑${ahead}"
PS1+="${Blu}⚡${R}|${Blu}${tag_release}↑${ahead}"
else
if [[ -z $tag_release ]];then
PS1+="${Red}✔"

Loading…
Cancel
Save