summaryrefslogtreecommitdiffstats
path: root/radar-base.sh
diff options
context:
space:
mode:
Diffstat (limited to 'radar-base.sh')
-rwxr-xr-xradar-base.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/radar-base.sh b/radar-base.sh
index d9cd8f5..e21122a 100755
--- a/radar-base.sh
+++ b/radar-base.sh
@@ -65,6 +65,8 @@ 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:-""}"
+
RESET_COLOR_LOCAL="%{${GIT_RADAR_COLOR_LOCAL_RESET:-$reset_color}%}"
RESET_COLOR_REMOTE="%{${GIT_RADAR_COLOR_REMOTE_RESET:-$reset_color}%}"
RESET_COLOR_CHANGES="%{${GIT_RADAR_COLOR_CHANGES_RESET:-$reset_color}%}"
@@ -484,3 +486,18 @@ show_remote_status() {
fi
return 0
}
+
+render_prompt() {
+ if [[ $PROMPT_FORMAT =~ ^.*%{remote}.*$ ]]; then
+ zsh_color_remote_commits
+ fi
+ if [[ $PROMPT_FORMAT =~ ^.*%{branch}.*$ ]]; then
+ zsh_readable_branch_name
+ fi
+ if [[ $PROMPT_FORMAT =~ ^.*%{local}.*$ ]]; then
+ zsh_color_local_commits
+ fi
+ if [[ $PROMPT_FORMAT =~ ^.*%{changes}.*$ ]]; then
+ zsh_color_changes_status
+ fi
+}