summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xradar-base.sh26
1 files changed, 14 insertions, 12 deletions
diff --git a/radar-base.sh b/radar-base.sh
index a4c67a1..d9cd8f5 100755
--- a/radar-base.sh
+++ b/radar-base.sh
@@ -184,18 +184,6 @@ branch_ref() {
fi
}
-zsh_readable_branch_name() {
- if is_repo; then
- printf '%s' "$COLOR_BRANCH$(branch_name || printf '%s' "detached@$(commit_short_sha)")$RESET_COLOR_BRANCH"
- fi
-}
-
-bash_readable_branch_name() {
- if is_repo; then
- printf "$COLOR_BRANCH$(branch_name || printf '%s' "detached@$(commit_short_sha)")$RESET_COLOR_BRANCH"
- fi
-}
-
remote_branch_name() {
local localRef="\/$(branch_name)$"
if [[ -n "$localRef" ]]; then
@@ -476,6 +464,20 @@ zsh_color_remote_commits() {
color_remote_commits
}
+readable_branch_name() {
+ if is_repo; then
+ printf $PRINT_F_OPTION "$COLOR_BRANCH$(branch_name || printf '%s' "detached@$(commit_short_sha)")$RESET_COLOR_BRANCH"
+ fi
+}
+
+zsh_readable_branch_name() {
+ readable_branch_name
+}
+
+bash_readable_branch_name() {
+ readable_branch_name
+}
+
show_remote_status() {
if [[ $@ == *$NO_REMOTE_STATUS* ]]; then
return 1 # don't show the git remote status