doc: dircolors: document reading from standard input

* src/dircolors.c (usage): Note that standard input is read when FILE is
"-".
* doc/coreutils.text (dircolors invocation): Likewise.
This commit is contained in:
Collin Funk committed 2026-10-23 19:31:38 -07:00
1 parent 2c2a1334fa
commit 479317e6ce
2 files changed
+10 -3

No files matched your search

+4 -3
View File
@@ -8611,9 +8611,10 @@ eval "$(dircolors [@var{option}]@dots{} [@var{file}])"
@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
+6
View File
@@ -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 is -, read standard input.\n\
"), stdout);
fputs (_("\
\n\
Determine format of output:\n\
"), stdout);