bug-coreutils
[Top][All Lists]
Advanced

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

Color enhancement for ls


From: hhowe
Subject: Color enhancement for ls
Date: Wed, 2 Jun 2004 14:42:11 -0500 (CDT)

Hi all,

I have added a feature to version 5.2.1 of ls, and would like to know 
whether my change should be submitted. 

My change consists of a new command line switch (--suffix). If --suffix
is passed, the file extension overrides the file's permissions when 
determining output color. Usage > ls --color --suffix

On linux and unix, my feature is almost totally worthless. However, on
windows (ie a cygwin environment), this feature is very handy. On 
windows, for reasons I don't completely understand, almost all files 
seem to have executable permisions (even .c and .txt files). I think 
this has to do with how cygwin maps windows file attributes to unix 
attributes, but I'm not going to pretend that I know exactly what is 
going on.

Without my change, ls --color displays every file as if it were 
executable. With my change, ls --color --suffix uses a more practical 
coloring scheme, and the user sees what they would see if they were 
using a real operating system, like linux :)

My changes are relatively minor. I can provide my modified version of
ls.c if anyone wants to see the changes.

H^2




reply via email to

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