When I vi my .bashrc file it is colorized, i.e.
but when I cat
or less
the file I get all white, i.e.
How can I get cat
(and less
) to have color?
cat does have color for my ruby .rb
files but not for these bash dot files the way that vi does for bash dot files.
less doesn't have color for ruby .rb
files at all.
Gnome terminal is 3.6.1
Ubuntu is 13.04
Bash is v4.2.45(1)
Best Answer
Trying to run
source-highlight
as suggested in the linked question produces this error:That's because
.bashrc
is not recognized automatically bysource-highlight
, a quick look through its manual shows that it has the-s
flag to set a language, so what you need is: