summaryrefslogtreecommitdiffstats
path: root/radar-base.sh
diff options
context:
space:
mode:
authorMichael Allen <michael@michaelallen.io>2015-09-05 10:50:47 +0100
committerMichael Allen <michael@michaelallen.io>2015-09-05 10:50:47 +0100
commit3884b1fdf423f4e8655dd47bef0ccb2ebdd68c6d (patch)
treeb9cbd5502d50ba10b613a9f589d460706000ac65 /radar-base.sh
parent01a35aaf0d11774e40aa72d229132ef4937d7ab6 (diff)
downloadgit-sonar-3884b1fdf423f4e8655dd47bef0ccb2ebdd68c6d.tar.gz
git-sonar-3884b1fdf423f4e8655dd47bef0ccb2ebdd68c6d.zip
Fix colour issue for zshv0.3.2
Diffstat (limited to '')
-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