summaryrefslogtreecommitdiffstats
path: root/radar-base.sh
diff options
context:
space:
mode:
authorMichael Allen <michael@michaelallen.io>2015-08-31 00:46:29 +0100
committerMichael Allen <michael@michaelallen.io>2015-08-31 00:46:29 +0100
commit3c500ca9fe517710d75d6d09084fa7038dea39db (patch)
tree6278a8234b47140eca0086b700af1b87dc4c4141 /radar-base.sh
parent5241c9fa41efbc96f333a6e220d3dc0d1c6fa676 (diff)
downloadgit-sonar-3c500ca9fe517710d75d6d09084fa7038dea39db.tar.gz
git-sonar-3c500ca9fe517710d75d6d09084fa7038dea39db.zip
Provide a way to set a .gitradarrc file
Diffstat (limited to 'radar-base.sh')
-rwxr-xr-xradar-base.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/radar-base.sh b/radar-base.sh
index 541b5e7..f707587 100755
--- a/radar-base.sh
+++ b/radar-base.sh
@@ -3,8 +3,13 @@ NO_REMOTE_STATUS='--no-remote-status'
dot_git=""
cwd=""
remote=""
+rcfile_path="$HOME"
prepare_bash_colors() {
+ if [ -f "$rcfile_path/.gitradarrc" ]; then
+ source "$rcfile_path/.gitradarrc"
+ fi
+
COLOR_REMOTE_AHEAD="\x01${GIT_RADAR_COLOR_REMOTE_AHEAD:-"\\033[1;32m"}\x02"
COLOR_REMOTE_BEHIND="\x01${GIT_RADAR_COLOR_REMOTE_BEHIND:-"\\033[1;31m"}\x02"
COLOR_REMOTE_DIVERGED="\x01${GIT_RADAR_COLOR_REMOTE_DIVERGED:-"\\033[1;33m"}\x02"
@@ -25,6 +30,10 @@ prepare_bash_colors() {
}
prepare_zsh_colors() {
+ if [ -f "$rcfile_path/.gitradarrc" ]; then
+ source "$rcfile_path/.gitradarrc"
+ fi
+
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]}%}"