Improved separator for segments of same color (reset color after separator).

This commit is contained in:
Achim D. Brucker 2017-07-11 07:32:25 +01:00
parent c29d74ca50
commit e3e6ad3848
1 changed files with 5 additions and 2 deletions

View File

@ -59,7 +59,10 @@ prompt_segment() {
if [[ $CURRENT_BG != 'NONE' && $1 != $CURRENT_BG ]]; then
echo -n " %{$bg%F{$CURRENT_BG}%}$SEGMENT_SEPARATOR%{$fg%} "
else
echo -n "%{$bg%}%{$fg%}$SEGMENT_SEPARATOR_SAME_COLOR"
if [[ $CURRENT_BG != 'NONE' ]]; then
echo -n "%{$bg%}%{$fg%}$SEGMENT_SEPARATOR_SAME_COLOR"
fi
echo -n "%{$bg%}%{$fg%}"
fi
CURRENT_BG=$1
[[ -n $3 ]] && echo -n $3
@ -145,7 +148,7 @@ INACTIVEPROMPT='%{%f%b%k%}$(build_inactive_prompt) '
# Default configuration
SEGMENT_SEPARATOR=$PL_BRARROW
SEGMENT_SEPARATOR_SAME_COLOR=" $PL_RARROW "
SEGMENT_SEPARATOR_SAME_COLOR=" %{$fg[black]%}$PL_RARROW "
ISAVERSION=isa_version_dir
if [[ "$TERM" =~ ".*256.*" ]]; then