On Wed, Nov 07, 2001 at 01:03:14PM -0800, Craig Dickson wrote: > Alan Shutko wrote: > > > Nathan E Norman <[EMAIL PROTECTED]> writes: > > > > > Huh? "ls --color=auto" does the right thing. > > > > Unless something is using a pty to talk to ls. But that only disturbs > > emacs shell mode, afaik. > > It also won't work for anyone who wants to pipe ls into a pager. This, > to me, is the most annoying thing about the idea of changing a program's > behavior simply based on whether stdout is a tty. A better question > would be whether the chain of pipes ultimately leads to a tty, but > that's a trickier problem to solve, I suppose.
I guess that depends on your definition of "works". ls --color=auto | less certainly works ... all the files are displayed and there's not a bunch of tty control chars where the colors should have been. OTOH, there's no color. The original poster was complaining that the color codes screwed up his filter, not that the color didn't show up in the filter. -- Nathan Norman - Staff Engineer | A good plan today is better Micromuse Ltd. | than a perfect plan tomorrow. mailto:[EMAIL PROTECTED] | -- Patton
pgppAWO3JoqHB.pgp
Description: PGP signature