color

The color module abstracts the ansi color sequencies to the user.

It can translate both color names (red, black etc) and ansi colors (no translation needed) to ansicolors.

The user is encouraged to use this function since bashish can disable prompt colors in terminals which does not support ansi colors.

This module is unrelated to the FGCOLOR and BGCOLOR values

usage:

$ color [<raw>] [<COLOR|ATTRIBUTE>] [...] 
there is no hardcoded limit for how many or in which order arguments to color can be given as it translates directly to ascii codes.

If color is to be used outsied the shell parsed $PROMPT string, the "raw" option must be given to color.

where COLOR is one of

The above colors must be prefixed by either ``fg'' or ``bg'' to indicate wether the color is for the foreground or background. Foreground colors may also be prefixed ``bright'' (after the ``fg'') to get a brighter version of the colors.

<ATTRIBUTE> is one of

the attributes can be prefixed with "no" to disable the attribute

normal ansi numeric codes may also be given eg: 42 or 33

two typical 'color' examples:

$ color fgbrightred bgblue bold blink 

$ color 34 1 43

Thomas Eriksson 2004-06-23