Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 7 Dec 2003 11:38:07 -0700
From:      Robin Schoonover <end@endif.cjb.net>
To:        "Kevin D. Kinsey, DaleCo, S.P." <kdk@daleco.biz>
Cc:        freebsd-questions <freebsd-questions@freebsd.org>
Subject:   Re: ls and color
Message-ID:  <20031207113807.609850b7.end@endif.cjb.net>
In-Reply-To: <3FD0DFAB.5060904@daleco.biz>
References:  <3FD0CCB5.1000501@magidesign.com> <00fb01c3bb5d$ee483c90$f4f0a8c0@pcmedx.com> <3FD0DFAB.5060904@daleco.biz>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 05 Dec 2003 13:42:35 -0600, Kevin D. Kinsey, DaleCo, S.P. wrote:
> Mike Maltese wrote:
> > 
> >Well., there's ls -G, but you could have found that in the man page,
> >right?
> >
> >ls is not a web browser. Try www/lynx. if you want to grab a web page,
> >try fetch or ftp/wget.
> >
> 
> I think the OP meant "is there a how-to or a web page on
> making 'ls' show colors?"
> 
> ls -G is the standard option, as man page says, equivalent
> to setting CLICOLOR in your environment.
> 
> Some terminals (under X perhaps) don't handle this environment
> variable without some tweaking, though, I think..... ??
> 

It's up to ls to handle the enviroment variable.  CLICOLOR gets set in my
.cshrc, and it works fine in xterm (and the console) for me.

However, ls does have to lookup how to display the color.  The 'xterm'
terminal name in 4.x does not have color, so you have to tell xterm use
'xterm-color', which does have it.  This amounts to doing something
like "xterm -tn xterm-color".  (I've been using 5.1 lately, so if this was
MFC'd recently I wouldn't really know)

-- 
Robin Schoonover (aka End)
#
# An optimist is someone who believes Schroedinger's cat is half alive.
#



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031207113807.609850b7.end>