With the following change, ls is looking for a environment variable named  
"LS_WITH_COLOR" to know if by default it should do coloring.
That way in my .zshrc I can do export LS_WITH_COLOR=tty
and ls will do color for me.
The man page should be updated accordingly.

Thanks,

- jfv


localhost% diff ls.new.c fileutils-4.0/src/ls.c                             

881,903d880
<
<   if (p = getenv ("LS_WITH_COLOR"))
<     {
<       i = argmatch (p, color_args);
<       if (i > 0)
<       {
<         i = color_types[i];
<       }
<       else {
<       i = color_never;
<       }
<
<       print_with_color = i;
<
<       if (print_with_color)
<       {
<         /* Don't use TAB characters in output.  Some terminal
<            emulators can't handle the combination of tabs and
<            color codes on the same line.  */
<         tabsize = 0;
<       }
<     }
<

Reply via email to