[BusyBox] re: long args in bb_getopt_ulflags()

Tito farmatito at tiscali.it
Wed Feb 2 14:12:20 UTC 2005


Hi Paul,
I've looked at your ls-color patch this time, and just for fun
want to suggest an alternative solution.
At the moment I don't have code to show but only an idea
and i would like to know your opinion about it as you are more experienced
then i am.
The goal should be to make the code smaller:
[*] ls                                                               
   [*]     Enable filetyping options (-p and -F)
   [*]     Enable symlinks dereferencing (-L)
   [*]     Enable recursion (-R)
   [*]     Sort the file names    
   [*]     Show file timestamps  
   [*]     Show username/groupnames 
   [*]     Use color to identify file types   <- This turns on color by default with no way to turn it off
      [*]  Use color only if --color is specified on the command line

In this case we could just check for --color with no args and ignore LS_COLORS variable
at all as the colors are hardcoded.
It would be easy to turn color off/on depending on the devices and screens we are using.
The downside is that maybe this is not standard compliant.

Just an idea...

Thanks in advance for your time and advice,
Ciao,
Tito      



More information about the busybox mailing list