Next: , Up: The user's view   [Contents][Index]

2.1 The environment variable TERM

The environment variable TERM contains a identifier for the text window’s capabilities. You can get a detailed list of these cababilities by using the ‘infocmp’ command (for example: infocmp -L1 xterm), using ‘man 5 terminfo’ as a reference.

When producing text with embedded color directives, a libtextstyle-enabled program looks at the TERM variable. Text windows today typically support at least 8 colors. Often, however, the text window supports 16 or more colors, even though the TERM variable is set to a identifier denoting only 8 supported colors. It can be worth setting the TERM variable to a different value in these cases.

After setting TERM, you can verify how well it works by invoking ‘program --color=test’, where program is any libtextstyle-enabled program, and seeing whether the output looks like a reasonable color map.