From 5bee2b0f959cd44cd636610d06d67f103fdbe37b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Hunold?= Date: Fri, 16 Oct 2015 09:52:50 +0200 Subject: Escape all forward slashes With out the 'g' flag only the first one will be replaced. This leads to errors with branches like wip/user/hotfix. --- radar-base.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/radar-base.sh b/radar-base.sh index 258e5b1..aeb0f41 100755 --- a/radar-base.sh +++ b/radar-base.sh @@ -517,7 +517,7 @@ render_prompt() { fi fi if [[ $PROMPT_FORMAT =~ ${if_pre}branch${if_post} ]]; then - branch_result="$(readable_branch_name | sed -e 's/\//\\\//')" + branch_result="$(readable_branch_name | sed -e 's/\//\\\//g')" if [[ -n "$branch_result" ]]; then branch_sed="s/${sed_pre}branch${sed_post}/\2${branch_result}\4/" else -- cgit v1.2.3