summaryrefslogtreecommitdiffstats
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
parent01a35aaf0d11774e40aa72d229132ef4937d7ab6 (diff)
downloadgit-sonar-0.3.2.tar.gz
git-sonar-0.3.2.zip
Fix colour issue for zshv0.3.2
-rwxr-xr-xprompt.bash2
-rwxr-xr-xprompt.zsh2
-rwxr-xr-xradar-base.sh8
3 files changed, 9 insertions, 3 deletions
diff --git a/prompt.bash b/prompt.bash
index 604d8e1..264ea7b 100755
--- a/prompt.bash
+++ b/prompt.bash
@@ -10,7 +10,7 @@ if is_repo; then
if show_remote_status $args; then
bash_color_remote_commits
fi
- readable_branch_name
+ bash_readable_branch_name
bash_color_local_commits
printf "\x01\033[1;30m\x02)\x01\033[0m\x02"
bash_color_changes_status
diff --git a/prompt.zsh b/prompt.zsh
index e996b77..5a7cb40 100755
--- a/prompt.zsh
+++ b/prompt.zsh
@@ -12,7 +12,7 @@ if is_repo; then
if show_remote_status $args; then
zsh_color_remote_commits
fi
- readable_branch_name
+ zsh_readable_branch_name
zsh_color_local_commits
printf '%s' "%{$fg_bold[black]%})%{$reset_color%}"
zsh_color_changes_status
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