mirror of
https://github.com/ohmybash/oh-my-bash.git
synced 2024-05-11 05:55:37 +00:00
Add '_' to git branch name character whitelist
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user