summaryrefslogtreecommitdiffstats
path: root/radar-base.sh
diff options
context:
space:
mode:
Diffstat (limited to 'radar-base.sh')
-rwxr-xr-xradar-base.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/radar-base.sh b/radar-base.sh
index c793eab..2ad9ce7 100755
--- a/radar-base.sh
+++ b/radar-base.sh
@@ -180,7 +180,13 @@ branch_ref() {
fi
}
-readable_branch_name() {
+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