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

Bug#2729: color-ls segfaults for simple .dir_colors



Hallo Jeffrey Ebert
>
> Syrus Nemat-Nasser wrote:
> > Also, I would appreciate hearing
> > from anyone who has color-ls working on a 1.1 system under the default
> > configuration.  Thanks.
> >
>
> I have a 1.1 system with the default configuration.
>
> It works fine without a ~/.dir_colors file, but it fails with it. Without
it,
> LS_OPTIONS is set to "--8bit --color=tty -F". With an "OPTIONS -AFs" line
in
> the ~/.dir_colors file, LS_OPTIONS is set to "--8bit --color=no -AFs". The
> offending directive is "--color=no" (seg faults).
>
ok that seems to be an old bug :-)

Just chose --color=none or patch the ls-color:
here is the patch

Let ls accept --color=no like it is generated by dircolors.
patch was made by Joey@finlandia.infodrom.north.de (Martin Schulze)

--- orig/fileutils-3.12/src/ls.c        Wed Sep 27 10:47:15 1995
+++ fileutils-3.12/src/ls.c     Wed Sep 27 10:51:49 1995
@@ -598,13 +598,14 @@
 static char const* color_args[] =
 {
   /* Note: "no" is a prefix of "none" so we don't include it */
+  /*       but then it doesn't work, so I included it  -Joey */
   /* force and none are for compatibility with another color-ls version */
-  "yes", "force", "none", "tty", "if-tty", 0
+  "yes", "force", "none", "no", "tty", "if-tty", 0
 };

 static enum color_type const color_types[] =
 {
-  color_yes, color_yes, color_no, color_if_tty, color_if_tty
+  color_yes, color_yes, color_no, color_no, color_if_tty, color_if_tty
 };


cu
        Soenke
--
    Ich bin auch nachts f|r Linux. - Weil's da kein bvses Erwachen gibt.
------------------------------------------------------------------------------
Svnke Lange,                Studentenwohnheim Artillerieweg Netzwerk Verwaltung


Reply to: