bug-fileutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

color ls


From: David Barts
Subject: color ls
Date: Mon, 10 Sep 2001 04:22:42 -0700 (PDT)

Hello,

It makes sense to color some files based on their
name rather than suffix, e.g. 'core' or 'Makefile'. 

ls from fileutils 4.0 doesn't seem to support this,
so I've made some tweaks in ls.c which allow to add
to LS_COLOR instructions like :+core=01;31:
This does the job. The '+' in '+core' is needed to 
distinguish from entries like 'di' and 'ln'.

Note also that in my version per-file color spec
takes precedence over per-type. So if a user has a 
special attachment to file my_stuff.cpp she can make 
it stand out amongst the other *.cpp files.

I have attached the modified ls.c in case someone's
interested.

Regards

David Barts


__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com

Attachment: ls.c.gz
Description: ls.c.gz


reply via email to

[Prev in Thread] Current Thread [Next in Thread]