From owner-freebsd-questions Wed Jun 12 04:22:10 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id EAA25578 for questions-outgoing; Wed, 12 Jun 1996 04:22:10 -0700 (PDT) Received: from central.picker.com (central.picker.com [144.54.31.2]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id EAA25573 for ; Wed, 12 Jun 1996 04:22:09 -0700 (PDT) Received: from ct.picker.com by central.picker.com with smtp (Smail3.1.28.1 #3) id m0uTnvX-0004rnC; Wed, 12 Jun 96 07:17 EDT Received: from elmer.picker.com ([144.54.52.5]) by ct.picker.com (4.1/SMI-4.1) id AA22511; Wed, 12 Jun 96 07:17:03 EDT Received: by elmer.picker.com (SMI-8.6/SMI-SVR4) id HAA15326; Wed, 12 Jun 1996 07:18:16 -0400 From: rhh@ct.picker.com (Randall Hopper) Message-Id: <199606121118.HAA15326@elmer.picker.com> Subject: Re: colorls utility To: kelly@fsl.noaa.gov (Sean Kelly) Date: Wed, 12 Jun 1996 07:18:16 -0400 (EDT) Cc: questions@FreeBSD.org In-Reply-To: <199606111438.OAA10101@gatekeeper.fsl.noaa.gov> from "Sean Kelly" at Jun 11, 96 08:38:46 am Reply-To: rhh@ct.picker.com Organization: Picker International, CT Division X-Mailer: ELM [version 2.4 PL24 PGP3 *ALPHA*] Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-questions@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk Sean Kelly: >>>>>> "Randy" == Randy DuCharme writes: > Randy> Greetings, I've just installed colorls from 2.1 release. I > Randy> added "alias ls colorls -G" to my .cshrc. It works fine > Randy> until I do a "ls - |more. If I use more I get the > Randy> ANSI escape sequence and not the color. Is there a way > Randy> around this? > >I remember someone saying that they modified colorls to check to see >if its output is a tty, and only if it is a tty will it output the >color sequences. I don't know if this fix was made, though. I don't know if the change was was made in the distribution either, but if you pull the source, this is the patch. In bin/ls/ls.c, change: case 'G': f_color = 1; break; to: case 'G': if ( isatty(1) ) f_color = 1; break; Randall Hopper rhh@ct.picker.com