On Sat, 19 Jul 2008, Jim Meyering wrote:
Reuben Thomas <[EMAIL PROTECTED]> wrote:
On Sat, 19 Jul 2008, Jim Meyering wrote:
Reuben Thomas <[EMAIL PROTECTED]> wrote:
It would both be logical, and help with testing (where one wouldn't
have to change one's login script) if dircolors tried to load
~/.dircolors if no database is given and the file exists.
Or just put this in your start-up script:
d=.dircolors
test -r $d && eval "$(dircolors $d)"
That's fine, but, as always, good default behaviour is worth a hundred
times as much as configuration: it doesn't need a user to work it out,
read your mailing list message, or anything else. On the other hand,
you could improve the differential by putting the above tip in the
dircolors documentation.
Would you like to prepare a patch that adds to doc/coreutils.texi
the sort of tip you would have liked to see?
If so, contribution guidelines are here:
http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=blob;f=HACKING;hb=HEAD
Patch attached. I imagine I got something wrong, as I've not tried before
(but I *have* signed a copyright assignment for coreutils, if that's
needed), so do tell me what to fix.
--
http://rrt.sc3d.org/ | secret, n. what all know but none speaks
From 338503569bcabcb248217b36e4490e2ac09f664a Mon Sep 17 00:00:00 2001
From: Reuben Thomas <[EMAIL PROTECTED]>
Date: Tue, 22 Jul 2008 23:25:04 +0100
Subject: [PATCH] doc: Add example .bashrc code for a ~/.dircolors file.
* coreutils.texi: Add tip for .bashrc use from Jim Meyering.
---
doc/coreutils.texi | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index 44df6b3..81e3b91 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -6994,6 +6994,15 @@ colors to use for which file types and extensions.
Otherwise, a
precompiled database is used. For details on the format of these files,
run @samp{dircolors --print-database}.
+To make @command{dircolors} read a @file{~/.dircolors} file if it
+exists, you can put the following lines in your @file{~/.bashrc} (or
+adapt them to your favorite shell):
+
[EMAIL PROTECTED]
+d=.dircolors
+test -r $d && eval "$(dircolors $d)"
[EMAIL PROTECTED] example
+
@vindex LS_COLORS
@vindex SHELL @r{environment variable, and color}
The output is a shell command to set the @env{LS_COLORS} environment
--
1.5.4.3
_______________________________________________
Bug-coreutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-coreutils