diff options
author | Charles Peterson <cpeterson@brokerbin.com> | 2017-12-31 09:54:58 +0300 |
---|---|---|
committer | Charles Peterson <cpeterson@brokerbin.com> | 2017-12-31 09:54:58 +0300 |
commit | ef0f8f0ba4afb4e81cd931fea1fb81edf8c5633d (patch) | |
tree | 17b71eeffaffc694ec03619f0ff6ebe53bbef42f | |
parent | 6bbff45bcebc7ff6538d24a2f77e35357cdef0b8 (diff) |
make sure the default colors are encoded properly in case they are named...
-rwxr-xr-x | powerlevel9k.zsh-theme | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index c0668251..79f7208b 100755 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -142,8 +142,8 @@ left_prompt_segment() { # subsegment (or the default color). This should have # enough contrast. local complement - [[ -n "$4" ]] && complement="$4" || complement=$DEFAULT_COLOR - echo -n "$bg%F{$complement}" + [[ -n "$4" ]] && complement="$fg" || complement="$(foregroundColor $DEFAULT_COLOR)" + echo -n "${bg}${complement}" if [[ $joined == false ]]; then echo -n "$(print_icon 'LEFT_SUBSEGMENT_SEPARATOR')$POWERLEVEL9K_WHITESPACE_BETWEEN_LEFT_SEGMENTS" fi @@ -229,10 +229,11 @@ right_prompt_segment() { # subsegment (or the default color). This should have # enough contrast. local complement - [[ -n "$4" ]] && complement="$4" || complement=$DEFAULT_COLOR - echo -n "%F{$complement}$(print_icon 'RIGHT_SUBSEGMENT_SEPARATOR')%f" + [[ -n "$4" ]] && complement="$fg" || complement="$(foregroundColor $DEFAULT_COLOR)" + echo -n "$complement$(print_icon 'RIGHT_SUBSEGMENT_SEPARATOR')%f" else - echo -n "%F{$3}$(print_icon 'RIGHT_SEGMENT_SEPARATOR')%f" + # Use the new BG color for the foreground with separator + echo -n "$(foregroundColor $3)$(print_icon 'RIGHT_SEGMENT_SEPARATOR')%f" fi fi |