Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

updates to g2 prompt

  • Loading branch information...
commit 678ee5c01ba0682132c9dc3e64feb680a1a9d11b 1 parent a4f51ae
Olivier Refalo authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 g2-prompt.sh
4 g2-prompt.sh
View
@@ -383,7 +383,7 @@ parse_g2_status() {
#### GET THE BRANCH NAME
local branch=$("$GIT_EXE" branch | grep "*" | sed "s/* //")
- branch=${branch/master/M}
+ branch=${branch/#master/M}
# another method of above:
# branch=$(git symbolic-ref -q HEAD || { echo -n "detached:" ; git name-rev --name-only HEAD 2>/dev/null; } )
@@ -399,7 +399,7 @@ parse_g2_status() {
branch="<detached:$("$GIT_EXE" name-rev --name-only HEAD 2>/dev/null)"
elif [[ "$op" ]]; then
branch="$op:$branch"
- [[ "$op" = "merge" ]] && branch+="<--$("$GIT_EXE" name-rev --name-only $(<$git_dir/MERGE_HEAD))"
+ [[ "$op" == "merge" ]] && branch+="<--$("$GIT_EXE" name-rev --name-only $(<$git_dir/MERGE_HEAD))"
#branch="<$branch>"
fi
vcs_info="$branch$rawhex"
Please sign in to comment.
Something went wrong with that request. Please try again.