Turn the main engine into a function.
This commit is contained in:
@ -352,10 +352,8 @@ function named_color()
|
|||||||
rgb_color ${mapped}
|
rgb_color ${mapped}
|
||||||
}
|
}
|
||||||
|
|
||||||
output=""
|
function build_sgr_code()
|
||||||
|
{
|
||||||
while [[ ! -z $1 ]]
|
|
||||||
do
|
|
||||||
case $1 in
|
case $1 in
|
||||||
dump-colors) dump_colors ;;
|
dump-colors) dump_colors ;;
|
||||||
|
|
||||||
@ -399,6 +397,12 @@ do
|
|||||||
output="${output};"
|
output="${output};"
|
||||||
fi
|
fi
|
||||||
output="${output}${next}"
|
output="${output}${next}"
|
||||||
|
}
|
||||||
|
|
||||||
|
output=""
|
||||||
|
while [[ ! -z $1 ]]
|
||||||
|
do
|
||||||
|
build_sgr_code $1
|
||||||
shift 1
|
shift 1
|
||||||
done
|
done
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user