summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorReuben Thomas <rrt@sc3d.org>2008-07-22 23:25:04 +0100
committerJim Meyering <meyering@redhat.com>2008-07-23 09:11:53 +0200
commit77d97a1be482bd27627198a1bc852369d4749d90 (patch)
treec45f0d8a8e69d11c894edccbea9ae072a855ee47 /doc
parentf82c5ba71efd1228a58953b6efc5e0d84c73e8a4 (diff)
downloadcoreutils-77d97a1be482bd27627198a1bc852369d4749d90.tar.xz
doc: add example .bashrc code for a ~/.dircolors file
* coreutils.texi: Add tip for .bashrc use from Jim Meyering.
Diffstat (limited to 'doc')
-rw-r--r--doc/coreutils.texi9
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index 44df6b3e5..81e3b911c 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):
+
+@example
+d=.dircolors
+test -r $d && eval "$(dircolors $d)"
+@end example
+
@vindex LS_COLORS
@vindex SHELL @r{environment variable, and color}
The output is a shell command to set the @env{LS_COLORS} environment