* src/dircolors.c (usage): Note that standard input is read when FILE is
"-".
* doc/coreutils.text (dircolors invocation): Likewise.
---
 doc/coreutils.texi | 7 ++++---
 src/dircolors.c    | 6 ++++++
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index 8537fd8cd..a916b9cf3 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -8611,9 +8611,10 @@ @node dircolors invocation
 @end example
 
 If @var{file} is specified, @command{dircolors} reads it to determine which
-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}.
+colors to use for which file types and extensions.  If @var{file} is
+@samp{-}, @command{dircolors} from standard input.  If @var{file} is
+not specified, 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
diff --git a/src/dircolors.c b/src/dircolors.c
index bd7706f05..017ce66bd 100644
--- a/src/dircolors.c
+++ b/src/dircolors.c
@@ -102,6 +102,12 @@ usage (int status)
       printf (_("Usage: %s [OPTION]... [FILE]\n"), program_name);
       fputs (_("\
 Output commands to set the LS_COLORS environment variable.\n\
+"), stdout);
+      fputs (_("\
+\n\
+When FILE -, read standard input.\n\
+"), stdout);
+      fputs (_("\
 \n\
 Determine format of output:\n\
 "), stdout);
-- 
2.56.0


Reply via email to