Browse Source

fix again #2

master 0.10.3
pvincent 4 years ago
parent
commit
a8a87ad6bc
  1. 3
      bash.bashrc

3
bash.bashrc

@ -107,8 +107,7 @@ __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 --tags 2>&1 | cut -d'-' -f1)
local tag_release=$(git describe --tags 2> /dev/null | cut -d'-' -f1)
local dirty=$(git status -s | wc -l)
if [[ $dirty -ne 0 ]]; then
PS1+="⚡|${tag_release}${Yel}…$dirty"

Loading…
Cancel
Save