> > > >edit .bashrc in your home directory and add
> > > >
> > > >alias ls='ls --color=yes'
> > > 
> > > Better to use "--color=tty".
> > 
> > "--color" works equally good.
> 
> No, it doesn't always.
> 
> For instance:
> 
> % /bin/ls -a --color > foo
> % cat -v foo
> ^[[01;34m.^[[0m
> ^[[01;34m..^[[0m
> ^[[0mfoo^[[0m
> 
> With --color, any programs which take the ouput of ls through, say, a 
> pipe will be confused by the escape codes. The --color=tty option will 
> only output escape sequences (and colors) to the screen.

Hmmmm. Well, I had alias dir="ls -F --color=yes" in my /etc/bashrc and for
example piping things to less printed the color codes but not to more. So,
I just tried it out with --color and with --color=tty and got the same
results. Probably more a less issue then a ls thing, but it is identical
behavior regardless.


-- 
  PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
http://www.redhat.com/RedHat-FAQ /RedHat-Errata /RedHat-Tips /mailing-lists
         To unsubscribe: mail [EMAIL PROTECTED] with 
                       "unsubscribe" as the Subject.

Reply via email to