diff options
author | Michael Allen <michael@michaelallen.io> | 2015-09-17 10:40:06 +0100 |
---|---|---|
committer | Michael Allen <michael@michaelallen.io> | 2015-09-17 10:40:06 +0100 |
commit | 3e809c83741cc6466090169404dd0aa2672d29ac (patch) | |
tree | 15cb08b3dfeb50085b38f069d1718a4e4b6478af /radar-base.sh | |
parent | 5d2bded520a2649a3cc19b6c767fa23d9b00555e (diff) | |
download | git-sonar-3e809c83741cc6466090169404dd0aa2672d29ac.tar.gz git-sonar-3e809c83741cc6466090169404dd0aa2672d29ac.zip |
Add prefix/suffixing to local diff
Diffstat (limited to 'radar-base.sh')
-rwxr-xr-x | radar-base.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/radar-base.sh b/radar-base.sh index 6458446..665b30a 100755 --- a/radar-base.sh +++ b/radar-base.sh @@ -499,8 +499,8 @@ render_prompt() { if [[ $PROMPT_FORMAT =~ ^.*%{branch}.*$ ]]; then branch_sed="s/%{branch}/$(readable_branch_name)/" fi - if [[ $PROMPT_FORMAT =~ ^.*%{local}.*$ ]]; then - local_sed="s/%{local}/$(color_local_commits)/" + if [[ $PROMPT_FORMAT =~ %{([^%{}]{1,}:){0,1}local(:[^%{}]{1,}){0,1}} ]]; then + local_sed="s/%{\(\([^%^{^}]*\)\:\)\{0,1\}local\(\:\([^%^{^}]*\)\)\{0,1\}}/\2$(color_local_commits)\4/" fi if [[ $PROMPT_FORMAT =~ %{([^%{}]{1,}:){0,1}changes(:[^%{}]{1,}){0,1}} ]]; then changes_sed="s/%{\(\([^%^{^}]*\)\:\)\{0,1\}changes\(\:\([^%^{^}]*\)\)\{0,1\}}/\2$(color_changes_status)\4/" |