summaryrefslogtreecommitdiffstats
path: root/radar-base.sh
diff options
context:
space:
mode:
authorMichael Allen <michael@michaelallen.io>2015-09-17 09:45:57 +0100
committerMichael Allen <michael@michaelallen.io>2015-09-17 09:45:57 +0100
commit5d2bded520a2649a3cc19b6c767fa23d9b00555e (patch)
treef2630d0feaf8d6e5c10f135930910807e02da75f /radar-base.sh
parent6b6467dd66d7d8bd7b2ac357063876f9bed3a3cb (diff)
downloadgit-sonar-5d2bded520a2649a3cc19b6c767fa23d9b00555e.tar.gz
git-sonar-5d2bded520a2649a3cc19b6c767fa23d9b00555e.zip
Make providing a prefix and suffix to changes possible
Diffstat (limited to 'radar-base.sh')
-rwxr-xr-xradar-base.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/radar-base.sh b/radar-base.sh
index b7231de..6458446 100755
--- a/radar-base.sh
+++ b/radar-base.sh
@@ -502,8 +502,8 @@ render_prompt() {
if [[ $PROMPT_FORMAT =~ ^.*%{local}.*$ ]]; then
local_sed="s/%{local}/$(color_local_commits)/"
fi
- if [[ $PROMPT_FORMAT =~ ^.*%{changes}.*$ ]]; then
- changes_sed="s/%{changes}/$(color_changes_status)/"
+ if [[ $PROMPT_FORMAT =~ %{([^%{}]{1,}:){0,1}changes(:[^%{}]{1,}){0,1}} ]]; then
+ changes_sed="s/%{\(\([^%^{^}]*\)\:\)\{0,1\}changes\(\:\([^%^{^}]*\)\)\{0,1\}}/\2$(color_changes_status)\4/"
fi
sed \