bash has support for ansi escape codes. i would like to use fancy and pretty printing of some test in a script. since i didn't find any basic builtin\lib\tool\script that provide this functionality, it seems that i have to use a hardcoded mapping between names and escape codes, e.g.
RESET="0"
BOLD="1"
FAINT="2"
ITALIC="3"
# etc.
FG_RED="31"
BG_RED="41"
is there any builtin\lib\tool\script that gives a simple interface/tool/lib/etc. to use ansi colors and effect in bash? if not, how can i retrieve the mapping somehow?
I usually drop something like this in at the top of my scripts..
Then I can do things like this:
Take a look at (https://github.com/kigster/bashmatic) or a script like this: bashmatic