Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Apr 2002 15:53:42 -0400
From:      mpd <mpd@rochester.rr.com>
To:        "e.cerejo@laposte.net" <e.cerejo@laposte.net>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: ls with the -G option
Message-ID:  <20020426155342.A3115@rochester.rr.com>
In-Reply-To: <GV6XAO$FA089681B7A16C9049DA4E4750665E9E@laposte.net>; from e.cerejo@laposte.net on Fri, Apr 26, 2002 at 09:40:00PM %2B0200
References:  <GV6XAO$FA089681B7A16C9049DA4E4750665E9E@laposte.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Apr 26, 2002 at 09:40:00PM +0200, e.cerejo@laposte.net wrote:
> > On Fri, Apr 26, 2002 at 06:52:51PM +0200,
> e.cerejo@laposte.net wrote:
> > > Is it possible to make the ls command run with the -G
> option
> > > every time you run ls or ls with any other option.  I just
> > > want it to show color all the time and to be able to add
> more
> > > options to it, for example ls -a I would like it to give
> the
> > > results in color without having to add the -G option all
> the
> > > time.  Thanks
> > 
> > A shell alias will allow for this.
> > 
> > 
> 
> How is it done?
> 

For csh derivatives, the syntax is like: alias ls 'ls -G'
For sh derivatives, it's: alias ls='ls -G'

You can enter them from the command line, or just add the
line to your .cshrc/.profile to have them automatically
set.

There's a load of documentation on aliases.

In this case, as was already suggested, you can just
set the CLICOLOR environment variable to get color
as well. I guess do whichever one gives you a warm,
fuzzy feeling. You don't need to do both, though.

mike
-- 
___________________________________________________________
 
"AND THEN THEY SAID 'NO ONE LEAVES THIS
	COMPOUND ALIVE!!'"
	- Little Girl from "THE MR NUTTY SCHOOL OF
		PLACEMAT DESIGN"

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




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