Fix error in git prompt script
This commit is contained in:
parent
54b658e071
commit
29a11032c6
1 changed files with 2 additions and 2 deletions
|
@ -68,7 +68,7 @@ git__prompt () {
|
||||||
if [ -z "$branch" ]
|
if [ -z "$branch" ]
|
||||||
then
|
then
|
||||||
head=$(git rev-parse --short HEAD 2>&1)
|
head=$(git rev-parse --short HEAD 2>&1)
|
||||||
if [[ "$head" =~ fatal* ]]
|
if [ $(echo "$head" | grep '^fatal') ]
|
||||||
then
|
then
|
||||||
branch='{no commits}'
|
branch='{no commits}'
|
||||||
else
|
else
|
||||||
|
@ -78,7 +78,7 @@ git__prompt () {
|
||||||
if [ "$branch" = 'master' ]
|
if [ "$branch" = 'master' ]
|
||||||
then
|
then
|
||||||
/bin/echo -ne " $blue$branch"
|
/bin/echo -ne " $blue$branch"
|
||||||
elif [ $(echo "$branch" | grep '^#' ) ]
|
elif [ $(echo "$branch" | grep '^#' ) ]
|
||||||
then
|
then
|
||||||
/bin/echo -ne " $red$branch"
|
/bin/echo -ne " $red$branch"
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue