summaryrefslogtreecommitdiffstats
path: root/radar-base.sh
diff options
context:
space:
mode:
authorMichael Allen <michael@michaelallen.io>2015-08-30 13:43:59 +0100
committerMichael Allen <michael@michaelallen.io>2015-08-30 13:43:59 +0100
commit0133ca499824f4d41ef9bd9a847934bd66fa32cd (patch)
tree3b1bcda1e65b5bb498f6e9518ad017b31b33088e /radar-base.sh
parent3c7b0841158b23be74f796c84880ec01a91cc5ad (diff)
downloadgit-sonar-0133ca499824f4d41ef9bd9a847934bd66fa32cd.tar.gz
git-sonar-0133ca499824f4d41ef9bd9a847934bd66fa32cd.zip
Rename reset color and move color setup
Diffstat (limited to '')
-rwxr-xr-xradar-base.sh14
1 files changed, 7 insertions, 7 deletions
diff --git a/radar-base.sh b/radar-base.sh
index 7d5db56..ee45300 100755
--- a/radar-base.sh
+++ b/radar-base.sh
@@ -5,12 +5,14 @@ cwd=""
remote=""
prepare_zsh_colors() {
+ autoload colors && colors
+
ZSH_COLOR_REMOTE_AHEAD="${GIT_RADAR_COLOR_ZSH_REMOTE_AHEAD:-$fg_bold[green]}"
ZSH_COLOR_REMOTE_BEHIND="${GIT_RADAR_COLOR_ZSH_REMOTE_BEHIND:-$fg_bold[red]}"
ZSH_COLOR_REMOTE_DIVERGED="${GIT_RADAR_COLOR_ZSH_REMOTE_DIVERGED:-$fg_bold[yellow]}"
ZSH_COLOR_REMOTE_NOT_UPSTREAM="${GIT_RADAR_COLOR_ZSH_REMOTE_NOT_UPSTREAM:-$fg_bold[red]}"
- ZSH_RESET_COLOR="${GIT_RADAR_COLOR_ZSH_RESET:-$reset_color}"
+ ZSH_RESET_COLOR_REMOTE="${GIT_RADAR_COLOR_ZSH_REMOTE_RESET:-$reset_color}"
}
in_current_dir() {
@@ -457,13 +459,11 @@ bash_color_remote_commits() {
}
zsh_color_remote_commits() {
- prepare_zsh_colors
-
local remote_master="$(printf '\xF0\x9D\x98\xAE')" # an italic m to represent master
- local green_ahead_arrow="%{$ZSH_COLOR_REMOTE_AHEAD%}←%{$ZSH_RESET_COLOR%}"
- local red_behind_arrow="%{$ZSH_COLOR_REMOTE_BEHIND%}→%{$ZSH_RESET_COLOR%}"
- local yellow_diverged_arrow="%{$ZSH_COLOR_REMOTE_DIVERGED%}⇄%{$ZSH_RESET_COLOR%}"
- local not_upstream="%{$ZSH_COLOR_REMOTE_NOT_UPSTREAM%}⚡%{$ZSH_RESET_COLOR%}"
+ local green_ahead_arrow="%{$ZSH_COLOR_REMOTE_AHEAD%}←%{$ZSH_RESET_COLOR_REMOTE%}"
+ local red_behind_arrow="%{$ZSH_COLOR_REMOTE_BEHIND%}→%{$ZSH_RESET_COLOR_REMOTE%}"
+ local yellow_diverged_arrow="%{$ZSH_COLOR_REMOTE_DIVERGED%}⇄%{$ZSH_RESET_COLOR_REMOTE%}"
+ local not_upstream="%{$ZSH_COLOR_REMOTE_NOT_UPSTREAM%}⚡%{$ZSH_RESET_COLOR_REMOTE%}"
if remote_branch="$(remote_branch_name)"; then
remote_ahead="$(remote_ahead_of_master "$remote_branch")"