Turn the main engine into a function.

This commit is contained in:
2022-06-04 23:42:02 -04:00
parent 348c0af58c
commit 69f9e98e61

View File

@ -352,10 +352,8 @@ function named_color()
rgb_color ${mapped}
}
output=""
while [[ ! -z $1 ]]
do
function build_sgr_code()
{
case $1 in
dump-colors) dump_colors ;;
@ -399,6 +397,12 @@ do
output="${output};"
fi
output="${output}${next}"
}
output=""
while [[ ! -z $1 ]]
do
build_sgr_code $1
shift 1
done