fix prompt_ps1_git_branch() to properly show current "branch" information while rebasing
This commit is contained in:
parent
0933628f0e
commit
e658839a68
@ -19,7 +19,7 @@ function prompt_ps1_git_branch()
|
|||||||
if [[ "$branch_out" == "" ]]; then
|
if [[ "$branch_out" == "" ]]; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
re="^\\* (.no.branch.|\\(detached[^)]*\\)|[^ ]*)"
|
re="^\\* (\\((detached|no.branch)[^)]*\\)|[^ ]*)"
|
||||||
if [[ "$branch_out" =~ $re ]]; then
|
if [[ "$branch_out" =~ $re ]]; then
|
||||||
current_branch="${BASH_REMATCH[1]}"
|
current_branch="${BASH_REMATCH[1]}"
|
||||||
re="((ahead|behind)[^]]*)\\]"
|
re="((ahead|behind)[^]]*)\\]"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user