diff options
author | Michael Allen <michael@michaelallen.io> | 2015-09-05 10:50:47 +0100 |
---|---|---|
committer | Michael Allen <michael@michaelallen.io> | 2015-09-05 10:50:47 +0100 |
commit | 3884b1fdf423f4e8655dd47bef0ccb2ebdd68c6d (patch) | |
tree | b9cbd5502d50ba10b613a9f589d460706000ac65 | |
parent | 01a35aaf0d11774e40aa72d229132ef4937d7ab6 (diff) | |
download | git-sonar-0.3.2.tar.gz git-sonar-0.3.2.zip |
Fix colour issue for zshv0.3.2
-rwxr-xr-x | prompt.bash | 2 | ||||
-rwxr-xr-x | prompt.zsh | 2 | ||||
-rwxr-xr-x | radar-base.sh | 8 |
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 @@ -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 |