Igbanam
Igbanam

Reputation: 6082

Terminal Colors

After enabling CLICOLOR=1 in .bashrc, how do I specify colours for terminal operations. The only one I have seen is LSCOLORS=<some string specifying the color scheme> e.g. GxFxCxDxBxegedabagaced. Which other terminal operations can I set color schemes for?

Upvotes: 3

Views: 1035

Answers (2)

Tim Harper
Tim Harper

Reputation: 2621

I've often seen grep output colorized:

export GREP_OPTIONS='--color=always' GREP_COLOR=36

Where color:

30..37 = black, red, green, yellow, blue, magenta, cyan, white

40..47 = same as above, but background color

Upvotes: 1

bjarneh
bjarneh

Reputation: 618

some commands support colors some don't, grep will highlight matches with the --color option, to configure see GREP_COLORS, i.e. use an ANSI color def. to indicate you want something other than red :-)

note the --color option must be set to something, see man grep

Upvotes: 3

Related Questions