diff options
| author | Matt Hunter <m@lfurio.us> | 2026-02-28 08:20:04 -0500 |
|---|---|---|
| committer | Matt Hunter <m@lfurio.us> | 2026-02-28 08:20:04 -0500 |
| commit | 3fb2886b4a02b143ec5f8232a232eb2d11a7e578 (patch) | |
| tree | 3314ebf0ca421c4d0695398884afe198e46d5cb6 | |
| parent | b2a09d2a5b73b23a74b24e66b3f37b512b3920f7 (diff) | |
| download | git-sonar-3fb2886b4a02b143ec5f8232a232eb2d11a7e578.tar.gz git-sonar-3fb2886b4a02b143ec5f8232a232eb2d11a7e578.zip | |
Update default style of remote commits status
The %{remote} prompt feature is updated to more closely match the
appearance of the %{local} feature. This includes defining a new blank
default master symbol.
This patch is only intended to establish new default values. The
symbols and colors involved with this feature should soon be fully
configurable.
Signed-off-by: Matt Hunter <m@lfurio.us>
| -rwxr-xr-x | git-sonar | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -50,7 +50,7 @@ prepare_colors() { COLOR_STASH="\x01${GIT_RADAR_COLOR_STASH:-"\\033[1;33m"}\x02" 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"}" + 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: }%{condition}%{missingups}%{branch}%{ :local}\\x01\\033[1;30m\\x02)\\x01\\033[0m\\x02%{ :stash}%{ :changes}"}" @@ -383,20 +383,20 @@ color_missing_upstream() { } color_remote_commits() { - local green_ahead_arrow="${COLOR_REMOTE_AHEAD}←$RESET_COLOR_REMOTE" - local red_behind_arrow="${COLOR_REMOTE_BEHIND}→$RESET_COLOR_REMOTE" - local yellow_diverged_arrow="${COLOR_REMOTE_DIVERGED}⇄$RESET_COLOR_REMOTE" + local green_ahead_arrow="${COLOR_REMOTE_AHEAD}↑$RESET_COLOR_REMOTE" # "←" + local red_behind_arrow="${COLOR_REMOTE_BEHIND}↓$RESET_COLOR_REMOTE" # "→" + local yellow_diverged_arrow="${COLOR_REMOTE_DIVERGED}⇵$RESET_COLOR_REMOTE" # "⇄" if remote_branch="$(remote_branch_name)"; then remote_ahead="$(remote_ahead_of_master "$remote_branch")" remote_behind="$(remote_behind_of_master "$remote_branch")" if [[ "$remote_behind" -gt "0" && "$remote_ahead" -gt "0" ]]; then - remote="$MASTER_SYMBOL $remote_behind $yellow_diverged_arrow $remote_ahead" + remote="$MASTER_SYMBOL$remote_behind$yellow_diverged_arrow$remote_ahead" elif [[ "$remote_ahead" -gt "0" ]]; then - remote="$MASTER_SYMBOL $green_ahead_arrow $remote_ahead" + remote="$MASTER_SYMBOL$green_ahead_arrow$remote_ahead" elif [[ "$remote_behind" -gt "0" ]]; then - remote="$MASTER_SYMBOL $remote_behind $red_behind_arrow" + remote="$MASTER_SYMBOL$remote_behind$red_behind_arrow" fi fi |
