Better structure: The right prompt should deactivate the foreground color, after it is finished printing the content.

pull/22/head
Dominik Ritter 10 years ago
parent 3da637cfd6
commit ef72eca288

@ -417,8 +417,8 @@ right_prompt_segment() {
local bg fg local bg fg
[[ -n $2 ]] && bg="%K{$2}" || bg="%k" [[ -n $2 ]] && bg="%K{$2}" || bg="%k"
[[ -n $3 ]] && fg="%F{$3}" || fg="%f" [[ -n $3 ]] && fg="%F{$3}" || fg="%f"
echo -n "%f%F{$2}$(print_icon 'RIGHT_SEGMENT_SEPARATOR')%f%{$bg%}%{$fg%} " echo -n "%F{$2}$(print_icon 'RIGHT_SEGMENT_SEPARATOR')%f%{$bg%}%{$fg%} "
[[ -n $4 ]] && echo -n "$4 " [[ -n $4 ]] && echo -n "$4 %f"
} }
################################################################ ################################################################

Loading…
Cancel
Save