Skip to content
Prev 26770 / 63424 Next

Color coding

On Wed, 21 Nov 2007, Gasper Cankar wrote:

            
You haven't mentioned your platform: you would have to be working in a 
console which supported this, and e.g. the Windows GUI console does not.

Once you know the escape codes to change colour, it would be easy to write 
a listing function which did this.  You would almost certainly have to 
write some C code to find out what the codes are for the current terminal 
(on a modern system via the terminfo database): the GNU ls (part of 
coreutils) would provide you example code.

So, this is project for a package: are you volunteering?