Add '_' to git branch name character whitelist

This commit is contained in:
Jon Ware
2021-12-24 22:20:22 +09:00
committed by Koichi Murase
parent dde7ea6395
commit 39af832b76
+1 -1
View File
@@ -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
}