Adjust dircolors to match ls.c.
authorJim Meyering <meyering@redhat.com>
Sat, 16 Feb 2008 22:06:12 +0000 (23:06 +0100)
committerJim Meyering <meyering@redhat.com>
Sun, 17 Feb 2008 10:16:18 +0000 (11:16 +0100)
* src/dircolors.hin: comment out NORMAL and FILE, define RESET.
* src/dircolors.c (slack_codes) Add "RESET".
(ls_codes): Add "rs".

src/dircolors.c
src/dircolors.hin

index 5a5bf6e..2a90075 100644 (file)
@@ -1,5 +1,5 @@
 /* dircolors - output commands to set the LS_COLOR environment variable
-   Copyright (C) 1996-2007 Free Software Foundation, Inc.
+   Copyright (C) 1996-2008 Free Software Foundation, Inc.
    Copyright (C) 1994, 1995, 1997, 1998, 1999, 2000 H. Peter Anvin
 
    This program is free software: you can redistribute it and/or modify
@@ -59,7 +59,7 @@ static struct obstack lsc_obstack;
 
 static const char *const slack_codes[] =
 {
-  "NORMAL", "NORM", "FILE", "DIR", "LNK", "LINK",
+  "NORMAL", "NORM", "FILE", "RESET", "DIR", "LNK", "LINK",
   "SYMLINK", "ORPHAN", "MISSING", "FIFO", "PIPE", "SOCK", "BLK", "BLOCK",
   "CHR", "CHAR", "DOOR", "EXEC", "LEFT", "LEFTCODE", "RIGHT", "RIGHTCODE",
   "END", "ENDCODE", "SUID", "SETUID", "SGID", "SETGID", "STICKY",
@@ -68,7 +68,7 @@ static const char *const slack_codes[] =
 
 static const char *const ls_codes[] =
 {
-  "no", "no", "fi", "di", "ln", "ln", "ln", "or", "mi", "pi", "pi",
+  "no", "no", "fi", "rs", "di", "ln", "ln", "ln", "or", "mi", "pi", "pi",
   "so", "bd", "bd", "cd", "cd", "do", "ex", "lc", "lc", "rc", "rc", "ec", "ec",
   "su", "su", "sg", "sg", "st", "ow", "ow", "tw", "tw", NULL
 };
index 3fb5a2f..e60e11c 100644 (file)
@@ -63,8 +63,9 @@ TERM xterm-debian
 # 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
 # Background color codes:
 # 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white
-NORMAL 00      # global default, although everything should be something.
-FILE 00                # normal file
+#NORMAL 00     # no color code at all
+#FILE 00       # regular file: use no color at all
+RESET 0                # reset to "normal" color
 DIR 01;34      # directory
 LINK 01;36     # symbolic link.  (If you set this to 'target' instead of a
                # numerical value, the color is as for the file pointed to.)