From 39af832b766d83510a2e1a164c2ac9e9b37cb862 Mon Sep 17 00:00:00 2001 From: Jon Ware Date: Sat, 20 Feb 2021 07:54:28 +0000 Subject: [PATCH] Add '_' to git branch name character whitelist --- themes/base.theme.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/base.theme.sh b/themes/base.theme.sh index 381ad6d..e304ce3 100644 --- a/themes/base.theme.sh +++ b/themes/base.theme.sh @@ -132,7 +132,7 @@ function scm_prompt_info_common { function git_clean_branch { local unsafe_ref=$(command git symbolic-ref -q HEAD 2> /dev/null) local stripped_ref=${unsafe_ref##refs/heads/} - local clean_ref=${stripped_ref//[^a-zA-Z0-9\/]/-} + local clean_ref=${stripped_ref//[^a-zA-Z0-9\/_]/-} echo $clean_ref }