Added reset before all colors. This fixes a graphical bug.

This commit is contained in:
antalg
2014-04-29 19:18:26 +02:00
parent ff8df4628a
commit 4a8637b772

View File

@@ -97,22 +97,22 @@ getColor() {
tmp_color="$(tr '[:upper:]' '[:lower:]' <<< ${1})"
fi
case "${tmp_color}" in
'black') color_ret='\033[30m';;
'red') color_ret='\033[31m';;
'green') color_ret='\033[32m';;
'brown') color_ret='\033[33m';;
'blue') color_ret='\033[34m';;
'purple') color_ret='\033[35m';;
'cyan') color_ret='\033[36m';;
'light grey') color_ret='\033[37m';;
'dark grey') color_ret='\033[1;30m';;
'light red') color_ret='\033[1;31m';;
'light green') color_ret='\033[1;32m';;
'yellow') color_ret='\033[1;33m';;
'light blue') color_ret='\033[1;34m';;
'light purple') color_ret='\033[1;35m';;
'light cyan') color_ret='\033[1;36m';;
'white') color_ret='\033[1;37m';;
'black') color_ret='\033[0m\033[30m';;
'red') color_ret='\033[0m\033[31m';;
'green') color_ret='\033[0m\033[32m';;
'brown') color_ret='\033[0m\033[33m';;
'blue') color_ret='\033[0m\033[34m';;
'purple') color_ret='\033[0m\033[35m';;
'cyan') color_ret='\033[0m\033[36m';;
'light grey') color_ret='\033[0m\033[37m';;
'dark grey') color_ret='\033[0m\033[1;30m';;
'light red') color_ret='\033[0m\033[1;31m';;
'light green') color_ret='\033[0m\033[1;32m';;
'yellow') color_ret='\033[0m\033[1;33m';;
'light blue') color_ret='\033[0m\033[1;34m';;
'light purple') color_ret='\033[0m\033[1;35m';;
'light cyan') color_ret='\033[0m\033[1;36m';;
'white') color_ret='\033[0m\033[1;37m';;
# Some 256 colors
'orange') color_ret="$(colorize '202')";;
esac