oliverh said:
Most applications are looking for TERM set to xterm-color
Whether an application that is capable of using colors will make use thereof is mostly determined by the corresponding terminal capabilities being present in the terminal's
termcap(5) /
terminfo(5) entry.
$ tput Co
Outputs the number of colors the terminal is capable of displaying, according to the currently selected terminal type.
The environment variable [CMD=]CLICOLOR[/CMD] is only used by
$ ls
and, if defined, is equivalent to
$ ls -G
which enables colored output. Additionally [CMD=]CLICOLOR_FORCE[/CMD] may be defined in order to force
$ ls
to use colorized output even if the output does not go to a terminal, i.e. piping output to another program. [CMD=]LSCOLORS[/CMD] may be used to override the default set of colors, used for diplaying files of various types; Refer to
ls(1) for a detailed description.
The pager
more(1)/
less(1) has commandline options
-r and
-R for allowing color control sequences to pass through unhindered. So something like
$ ls -G | more -R
should work, provided [CMD=]CLICOLOR_FORCE[/CMD] is set (see above).