Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix bug in git-enabled color PS1

  • Loading branch information...
commit 24b580ecd2dd8165f1b6f75857007167f710c619 1 parent 7668fa4
@tdudziak authored
Showing with 1 addition and 3 deletions.
  1. +1 −3 .bashrc
View
4 .bashrc
@@ -50,12 +50,10 @@ function __git_ps1_color {
elif $(echo "$status" | egrep "^\w?A|M|D" > /dev/null); then
tput setaf 2 # green: changes in index
fi
- __git_ps1
- tput sgr0 # text reset
}
if [ "$color_prompt" = yes ]; then
- PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]`__git_ps1_color`\$ '
+ PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\[$(__git_ps1_color)\]$(__git_ps1)\[$(tput sgr0)\]\$ '
else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w`__git_ps1`\$ '
fi
Please sign in to comment.
Something went wrong with that request. Please try again.