bash_aliases: prompt_ps1_git_branch(): minor fix in case commit comment contained a "]" character
This commit is contained in:
parent
d48d5d7157
commit
64c6f733fb
@ -42,7 +42,7 @@ function prompt_ps1_git_branch()
|
||||
re="^\\* (.no.branch.|[^ ]*)"
|
||||
if [[ "$branch_out" =~ $re ]]; then
|
||||
current_branch="${BASH_REMATCH[1]}"
|
||||
re="((ahead|behind).*)\\]"
|
||||
re="((ahead|behind)[^]]*)\\]"
|
||||
if [[ "$branch_out" =~ $re ]]; then
|
||||
current_branch="$current_branch: ${BASH_REMATCH[1]}"
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user