From: William R. Ward (hermit@cats.UCSC.EDU)
Date: 05/09/93


From: hermit@cats.UCSC.EDU (William R. Ward)
Subject: Re: [Q] How to colorize directory listings?
Date: 9 May 1993 14:22:30

In article <gilC6IIrq.70s@netcom.com>, gil@netcom.com (Gilbert Nardo) writes:
) A note of caution when using this ls: some scripts rely on
) getting names via ls, but with the color option the command returns
) filenames with prepended escape codes (set color codes). This becomes
) a problem when the scripts are doing things like generating makefiles
) which require exact target name matching. If you are set on using
) the ls with color, then you may have to tack on the --no-color option
) for these cases (I don't know if there's an environment variable you
) can set to have this toggle on and off).

Well, I know that ls pays attention to whether it's running on a TTY
or not, to determine whether it should output a single-column or
multi-column format. It would seem logical to me that this same
criterion could be used to suppress colors if run in a script.

--Bill