summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Allen <michael@michaelallen.io>2015-08-30 16:46:28 +0100
committerMichael Allen <michael@michaelallen.io>2015-08-30 16:46:28 +0100
commit0a471db63edcb0ba1fcfb6792e51b791de3fcb81 (patch)
treed34eabde44bc12b7a00d7f6b7bf2a80dd0ecbab8
parent5b5c784e6caf83652d92532f426f3f8d40836b21 (diff)
downloadgit-sonar-0a471db63edcb0ba1fcfb6792e51b791de3fcb81.tar.gz
git-sonar-0a471db63edcb0ba1fcfb6792e51b791de3fcb81.zip
Move autoload back to prompt.zsh to make testing easier
-rwxr-xr-xprompt.zsh2
-rwxr-xr-xradar-base.sh2
2 files changed, 2 insertions, 2 deletions
diff --git a/prompt.zsh b/prompt.zsh
index 80c6f12..e996b77 100755
--- a/prompt.zsh
+++ b/prompt.zsh
@@ -5,6 +5,8 @@ args=$@
source "$dot/radar-base.sh"
if is_repo; then
+ autoload colors && colors
+
prepare_zsh_colors
printf '%s' "%{$fg_bold[black]%} git:(%{$reset_color%}"
if show_remote_status $args; then
diff --git a/radar-base.sh b/radar-base.sh
index 700ec22..b2ecd38 100755
--- a/radar-base.sh
+++ b/radar-base.sh
@@ -25,8 +25,6 @@ prepare_bash_colors() {
}
prepare_zsh_colors() {
- autoload colors && colors
-
COLOR_REMOTE_AHEAD="%{${GIT_RADAR_COLOR_REMOTE_AHEAD:-$fg_bold[green]}%}"
COLOR_REMOTE_BEHIND="%{${GIT_RADAR_COLOR_REMOTE_BEHIND:-$fg_bold[red]}%}"
COLOR_REMOTE_DIVERGED="%{${GIT_RADAR_COLOR_REMOTE_DIVERGED:-$fg_bold[yellow]}%}"