Skip to content

Commit

Permalink
Fix colour issue for zsh
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeldfallen committed Sep 5, 2015
1 parent 01a35aa commit 3884b1f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion prompt.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion prompt.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 7 additions & 1 deletion radar-base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3884b1f

Please sign in to comment.