Merge pull request #487 from dylanaraps/ascii_colors

Ascii: --ascii_colors, don't color text colors
This commit is contained in:
Dylan Araps 2016-12-03 16:55:17 +11:00 committed by GitHub
commit 3d900d3d55

View file

@ -2645,12 +2645,13 @@ get_distro_colors() {
# Overwrite distro colors if '$ascii_colors' doesn't # Overwrite distro colors if '$ascii_colors' doesn't
# equal 'distro'. # equal 'distro'.
[[ "${ascii_colors[0]}" != "distro" ]] && \ if [[ "${ascii_colors[0]}" != "distro" ]]; then
color_text="off"
set_colors ${ascii_colors[@]} set_colors ${ascii_colors[@]}
fi
} }
set_colors() { set_colors() {
# Ascii colors
c1="$(color "$1")${ascii_bold}" c1="$(color "$1")${ascii_bold}"
c2="$(color "$2")${ascii_bold}" c2="$(color "$2")${ascii_bold}"
c3="$(color "$3")${ascii_bold}" c3="$(color "$3")${ascii_bold}"
@ -2658,7 +2659,10 @@ set_colors() {
c5="$(color "$5")${ascii_bold}" c5="$(color "$5")${ascii_bold}"
c6="$(color "$6")${ascii_bold}" c6="$(color "$6")${ascii_bold}"
# Text colors [[ "$color_text" != "off" ]] && set_text_colors $@
}
set_text_colors() {
if [[ "${colors[0]}" == "distro" ]]; then if [[ "${colors[0]}" == "distro" ]]; then
title_color="$(color "$1")" title_color="$(color "$1")"
at_color="$reset" at_color="$reset"