Console Syntax Highlighting

Nicolas Galler beanie at
Sun May 11 14:51:26 PDT 2003

On Sun, May 11, 2003 at 07:38:49PM +0100, Jez Hancock wrote:
> On Sun, May 11, 2003 at 10:14:04AM -0700, Tom Smith wrote:
> > Is there a way to enable Linux-like syntax highlighting at the console?
> If you want color in programs like vim etc, you'll also need:
> setenv TERM xterm-color
> in your .cshrc file (I believe you need this anyway for ls -G to work by
> default).

btw one of the problem I had when switching between freebsd, linux and sun is
the terminfo file for cons25 from one of the other os landed in my .terminfo
directory and it had some kind of default colorless info.
So you might want to check on terminfo(5), see if you get colors if you do
something like
echo -e '\e[31mhello'
see if echo $TERM gives cons25. Try ls -FG with root.
see if you get colors in an xterm (you might need TERM=xterm-color as previous
poster pointed out... seems to work as is for me though with ls -FG), also
if you are telnetting from a linux box it's a bit special.

More information about the freebsd-questions mailing list