From owner-freebsd-questions Fri Apr 26 12:53:50 2002 Delivered-To: freebsd-questions@freebsd.org Received: from roc-66-66-72-6.rochester.rr.com (roc-66-66-72-6.rochester.rr.com [66.66.72.6]) by hub.freebsd.org (Postfix) with ESMTP id 8C90037B41D for ; Fri, 26 Apr 2002 12:53:44 -0700 (PDT) Received: by roc-66-66-72-6.rochester.rr.com (Postfix, from userid 1000) id E3207901A00; Fri, 26 Apr 2002 15:53:42 -0400 (EDT) Date: Fri, 26 Apr 2002 15:53:42 -0400 From: mpd To: "e.cerejo@laposte.net" Cc: freebsd-questions@FreeBSD.ORG Subject: Re: ls with the -G option Message-ID: <20020426155342.A3115@rochester.rr.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: ; from e.cerejo@laposte.net on Fri, Apr 26, 2002 at 09:40:00PM +0200 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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