From e658839a68fb48d65f99d0db82a2b7f7f5fbe3b5 Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Fri, 27 Jun 2014 14:14:34 -0400 Subject: [PATCH] fix prompt_ps1_git_branch() to properly show current "branch" information while rebasing --- bash_aliases | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bash_aliases b/bash_aliases index ffd3be9..8285de8 100755 --- a/bash_aliases +++ b/bash_aliases @@ -19,7 +19,7 @@ function prompt_ps1_git_branch() if [[ "$branch_out" == "" ]]; then return fi - re="^\\* (.no.branch.|\\(detached[^)]*\\)|[^ ]*)" + re="^\\* (\\((detached|no.branch)[^)]*\\)|[^ ]*)" if [[ "$branch_out" =~ $re ]]; then current_branch="${BASH_REMATCH[1]}" re="((ahead|behind)[^]]*)\\]"