From d2c7ed085ff711a9f34fc1b0f521bcde253f19c5 Mon Sep 17 00:00:00 2001 From: Michael Allen Date: Thu, 17 Sep 2015 10:55:09 +0100 Subject: Add prefix and suffixing to remote diff render --- radar-base.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'radar-base.sh') diff --git a/radar-base.sh b/radar-base.sh index be92bb2..9e233ea 100755 --- a/radar-base.sh +++ b/radar-base.sh @@ -499,8 +499,8 @@ render_prompt() { sed_pre="%{\(\([^%^{^}]*\)\:\)\{0,1\}" sed_post="\(\:\([^%^{^}]*\)\)\{0,1\}}" - if [[ $output =~ ^.*%{remote}.*$ ]]; then - remote_sed="s/%{remote}/$(color_remote_commits)/" + if [[ $output =~ ${if_pre}remote${if_post} ]]; then + remote_sed="s/${sed_pre}remote${sed_post}/\2$(color_remote_commits)\4/" fi if [[ $PROMPT_FORMAT =~ ${if_pre}branch${if_post} ]]; then branch_sed="s/${sed_pre}branch${sed_post}/\2$(readable_branch_name)\4/" -- cgit v1.2.3