summaryrefslogtreecommitdiffstats
path: root/radar-base.sh
diff options
context:
space:
mode:
Diffstat (limited to 'radar-base.sh')
-rwxr-xr-xradar-base.sh12
1 files changed, 5 insertions, 7 deletions
diff --git a/radar-base.sh b/radar-base.sh
index 693d763..b85f75f 100755
--- a/radar-base.sh
+++ b/radar-base.sh
@@ -31,7 +31,7 @@ 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}"}"
+ 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"
@@ -67,7 +67,7 @@ prepare_zsh_colors() {
COLOR_BRANCH="%{${GIT_RADAR_COLOR_BRANCH:-$reset_color}%}"
MASTER_SYMBOL="${GIT_RADAR_MASTER_SYMBOL:-"%{$reset_color%}$italic_m%{$reset_color%}"}"
- PROMPT_FORMAT="${GIT_RADAR_FORMAT:-" $fg_bold[grey]git:($reset_color%{remote}%{branch}%{local}$fg_bold[grey])$reset_color%{changes}"}"
+ PROMPT_FORMAT="${GIT_RADAR_FORMAT:-" $fg_bold[grey]git:($reset_color%{remote}%{branch}%{ :local}$fg_bold[grey])$reset_color%{changes}"}"
RESET_COLOR_LOCAL="%{${GIT_RADAR_COLOR_LOCAL_RESET:-$reset_color}%}"
RESET_COLOR_REMOTE="%{${GIT_RADAR_COLOR_REMOTE_RESET:-$reset_color}%}"
@@ -406,8 +406,6 @@ zsh_color_changes_status() {
}
color_local_commits() {
- local separator="${1:- }"
-
local green_ahead_arrow="${COLOR_LOCAL_AHEAD}↑$RESET_COLOR_LOCAL"
local red_behind_arrow="${COLOR_LOCAL_BEHIND}↓$RESET_COLOR_LOCAL"
local yellow_diverged_arrow="${COLOR_LOCAL_DIVERGED}⇵$RESET_COLOR_LOCAL"
@@ -418,11 +416,11 @@ color_local_commits() {
local_behind="$(commits_behind_of_remote "$remote_branch")"
if [[ "$local_behind" -gt "0" && "$local_ahead" -gt "0" ]]; then
- local_commits="$separator$local_behind$yellow_diverged_arrow$local_ahead"
+ local_commits="$local_behind$yellow_diverged_arrow$local_ahead"
elif [[ "$local_behind" -gt "0" ]]; then
- local_commits="$separator$local_behind$red_behind_arrow"
+ local_commits="$local_behind$red_behind_arrow"
elif [[ "$local_ahead" -gt "0" ]]; then
- local_commits="$separator$local_ahead$green_ahead_arrow"
+ local_commits="$local_ahead$green_ahead_arrow"
fi
fi
printf $PRINT_F_OPTION "$local_commits"