Skip to content

Commit 3884b1f

Browse files
Fix colour issue for zsh
1 parent 01a35aa commit 3884b1f

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

prompt.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ if is_repo; then
1010
if show_remote_status $args; then
1111
bash_color_remote_commits
1212
fi
13-
readable_branch_name
13+
bash_readable_branch_name
1414
bash_color_local_commits
1515
printf "\x01\033[1;30m\x02)\x01\033[0m\x02"
1616
bash_color_changes_status

prompt.zsh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ if is_repo; then
1212
if show_remote_status $args; then
1313
zsh_color_remote_commits
1414
fi
15-
readable_branch_name
15+
zsh_readable_branch_name
1616
zsh_color_local_commits
1717
printf '%s' "%{$fg_bold[black]%})%{$reset_color%}"
1818
zsh_color_changes_status

radar-base.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,13 @@ branch_ref() {
180180
fi
181181
}
182182

183-
readable_branch_name() {
183+
zsh_readable_branch_name() {
184+
if is_repo; then
185+
printf '%s' "$COLOR_BRANCH$(branch_name || printf '%s' "detached@$(commit_short_sha)")$RESET_COLOR_BRANCH"
186+
fi
187+
}
188+
189+
bash_readable_branch_name() {
184190
if is_repo; then
185191
printf "$COLOR_BRANCH$(branch_name || printf '%s' "detached@$(commit_short_sha)")$RESET_COLOR_BRANCH"
186192
fi

0 commit comments

Comments
 (0)