summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xprompt.bash9
-rwxr-xr-xradar-base.sh12
-rw-r--r--xargs0
3 files changed, 8 insertions, 13 deletions
diff --git a/prompt.bash b/prompt.bash
index 51c4db7..444ad7a 100755
--- a/prompt.bash
+++ b/prompt.bash
@@ -6,12 +6,5 @@ source "$dot/radar-base.sh"
if is_repo; then
prepare_bash_colors
- printf " \x01\033[1;30m\x02git:(\x01\033[0m\x02"
- if show_remote_status $args; then
- color_remote_commits
- fi
- readable_branch_name
- color_local_commits
- printf "\x01\033[1;30m\x02)\x01\033[0m\x02"
- color_changes_status
+ render_prompt
fi
diff --git a/radar-base.sh b/radar-base.sh
index 8a7faaf..693d763 100755
--- a/radar-base.sh
+++ b/radar-base.sh
@@ -31,6 +31,8 @@ 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}"}"
+
RESET_COLOR_LOCAL="\x01${GIT_RADAR_COLOR_LOCAL_RESET:-"\\033[0m"}\x02"
RESET_COLOR_REMOTE="\x01${GIT_RADAR_COLOR_REMOTE_RESET:-"\\033[0m"}\x02"
RESET_COLOR_CHANGES="\x01${GIT_RADAR_COLOR_CHANGES_RESET:-"\\033[0m"}\x02"
@@ -512,9 +514,9 @@ render_prompt() {
changes_sed="s/${sed_pre}changes${sed_post}/\2$(color_changes_status)\4/"
fi
- sed \
- -e "$remote_sed" \
- -e "$branch_sed" \
- -e "$changes_sed" \
- -e "$local_sed" <<<"$output"
+ printf '%b' "$output" | sed \
+ -e "$remote_sed" \
+ -e "$branch_sed" \
+ -e "$changes_sed" \
+ -e "$local_sed"
}
diff --git a/xargs b/xargs
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/xargs