diff options
author | Michael Allen <michael@michaelallen.io> | 2015-09-17 11:38:03 +0100 |
---|---|---|
committer | Michael Allen <michael@michaelallen.io> | 2015-09-17 11:38:03 +0100 |
commit | 1731759cb2a16a3814d9784bae905250c46ce36b (patch) | |
tree | f68d62cd33ea7180e4936e1866a34b825423f546 /radar-base.sh | |
parent | b4a48dd6b781e357fc513b1f6dd668d8933f3660 (diff) | |
download | git-sonar-1731759cb2a16a3814d9784bae905250c46ce36b.tar.gz git-sonar-1731759cb2a16a3814d9784bae905250c46ce36b.zip |
Switch bash to new render function
Diffstat (limited to 'radar-base.sh')
-rwxr-xr-x | radar-base.sh | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/radar-base.sh b/radar-base.sh index 8a7faaf..693d763 100755 --- a/radar-base.sh +++ b/radar-base.sh @@ -31,6 +31,8 @@ prepare_bash_colors() { COLOR_BRANCH="\x01${GIT_RADAR_COLOR_BRANCH:-"\\033[0m"}\x02" MASTER_SYMBOL="${GIT_RADAR_MASTER_SYMBOL:-"\\x01\\033[0m\\x02\\xF0\\x9D\\x98\\xAE\\x01\\033[0m\\x02"}" + PROMPT_FORMAT="${GIT_RADAR_FORMAT:-" \\x01\\033[1;30m\\x02git:(\\x01\\033[0m\\x02%{remote}%{branch}%{local}\\x01\\033[1;30m\\x02)\\x01\\033[0m\\x02%{changes}"}" + RESET_COLOR_LOCAL="\x01${GIT_RADAR_COLOR_LOCAL_RESET:-"\\033[0m"}\x02" RESET_COLOR_REMOTE="\x01${GIT_RADAR_COLOR_REMOTE_RESET:-"\\033[0m"}\x02" RESET_COLOR_CHANGES="\x01${GIT_RADAR_COLOR_CHANGES_RESET:-"\\033[0m"}\x02" @@ -512,9 +514,9 @@ render_prompt() { changes_sed="s/${sed_pre}changes${sed_post}/\2$(color_changes_status)\4/" fi - sed \ - -e "$remote_sed" \ - -e "$branch_sed" \ - -e "$changes_sed" \ - -e "$local_sed" <<<"$output" + printf '%b' "$output" | sed \ + -e "$remote_sed" \ + -e "$branch_sed" \ + -e "$changes_sed" \ + -e "$local_sed" } |