diff options
author | Charles Peterson <cpeterson@brokerbin.com> | 2017-12-16 00:42:35 +0300 |
---|---|---|
committer | Charles Peterson <cpeterson@brokerbin.com> | 2017-12-16 00:42:35 +0300 |
commit | 4d18fdc6e9252a5d93ab9e046b3d98421d1be715 (patch) | |
tree | 15bdddc1212b38e256da645dc96eda282c187f03 /powerlevel9k.zsh-theme | |
parent | 786dc5b3f211b786d5d77243548f0fec4e1618e4 (diff) |
fix for colors since the terminals so not always render named colors when using parameter expansion.
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-x | powerlevel9k.zsh-theme | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index 831e81c5..c0668251 100755 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -127,8 +127,8 @@ left_prompt_segment() { [[ -n $FG_COLOR_MODIFIER ]] && 4="$FG_COLOR_MODIFIER" local bg fg - [[ -n "$3" ]] && bg="%K{$3}" || bg="%k" - [[ -n "$4" ]] && fg="%F{$4}" || fg="%f" + [[ -n "$3" ]] && bg="$(backgroundColor $3)" || bg="$(backgroundColor)" + [[ -n "$4" ]] && fg="$(foregroundColor $4)" || fg="$(foregroundColor)" if [[ $CURRENT_BG != 'NONE' ]] && ! isSameColor "$3" "$CURRENT_BG"; then echo -n "$bg%F{$CURRENT_BG}" @@ -218,8 +218,8 @@ right_prompt_segment() { [[ -n $FG_COLOR_MODIFIER ]] && 4="$FG_COLOR_MODIFIER" local bg fg - [[ -n "$3" ]] && bg="%K{$3}" || bg="%k" - [[ -n "$4" ]] && fg="%F{$4}" || fg="%f" + [[ -n "$3" ]] && bg="$(backgroundColor $3)" || bg="$(backgroundColor)" + [[ -n "$4" ]] && fg="$(foregroundColor $4)" || fg="$(foregroundColor)" # If CURRENT_RIGHT_BG is "NONE", we are the first right segment. if [[ $joined == false ]] || [[ "$CURRENT_RIGHT_BG" == "NONE" ]]; then |