Subject: bug#52782: closed (Re: bug#52782: Man Page: Incorrect Summary of --color Option)

From: [email-masked] (GNU bug Tracking System)
Date: Fri, 24 Dec 2021 23:29:02 +0000

Your bug report

#52782: Man Page: Incorrect Summary of --color Option

which was filed against the coreutils package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
52782: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=52782
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#52782: Man Page: Incorrect Summary of --color Option
From: Paul Eggert <[email-masked]>
To: Pranab Lawrence Ekka Dasgupta <[email-masked]>
Cc: [email-masked]
Date: Fri, 24 Dec 2021 15:28:01 -0800
List-Id: <debbugs-submit.debbugs.gnu.org>

On 12/24/21 10:40, Pranab Lawrence Ekka Dasgupta wrote:
> Perhaps it could be reworded to "default if WHEN is omitted", although
> that does cause some repetition

Thanks, I gave that sort of thing a shot by installing the attached, and 
am closing the bug report.

From 2269ea5aa2b8579ed2ec22407f55de4fd7218e4b Mon Sep 17 00:00:00 2001
From: Paul Eggert <[email-masked]>
Date: Fri, 24 Dec 2021 15:25:29 -0800
Subject: [PATCH] ls: improve doc for =WHEN

* src/ls.c (usage): Improve clarity of =WHEN args (Bug#52782).
---
 src/ls.c | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/src/ls.c b/src/ls.c
index c350787b6..d6c7302dc 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -5424,18 +5424,13 @@ Sort entries alphabetically if none of -cftuvSUX nor --sort is specified.\n\
 "), stdout);
       fputs (_("\
   -C                         list entries by columns\n\
-      --color[=WHEN]         color the output; WHEN can be 'always' (default\
-\n\
-                               if omitted), 'auto', or 'never'; more info below\
-\n\
+      --color[=WHEN]         color the output WHEN; more info below\n\
   -d, --directory            list directories themselves, not their contents\n\
   -D, --dired                generate output designed for Emacs' dired mode\n\
 "), stdout);
       fputs (_("\
   -f                         list all entries in directory order\n\
-  -F, --classify[=WHEN]      append indicator (one of */=>@|) to entries;\n\
-                               WHEN can be 'always' (default if omitted),\n\
-                               'auto', or 'never'\n\
+  -F, --classify[=WHEN]      append indicator (one of */=>@|) to entries WHEN\n\
       --file-type            likewise, except do not append '*'\n\
       --format=WORD          across -x, commas -m, horizontal -x, long -l,\n\
                                single-column -1, verbose -l, vertical -C\n\
@@ -5468,8 +5463,7 @@ Sort entries alphabetically if none of -cftuvSUX nor --sort is specified.\n\
                                (overridden by -a or -A)\n\
 "), stdout);
       fputs (_("\
-      --hyperlink[=WHEN]     hyperlink file names; WHEN can be 'always'\n\
-                               (default if omitted), 'auto', or 'never'\n\
+      --hyperlink[=WHEN]     hyperlink file names WHEN\n\
 "), stdout);
       fputs (_("\
       --indicator-style=WORD  append indicator with style WORD to entry names:\
@@ -5563,6 +5557,10 @@ Also the TIME_STYLE environment variable sets the default style to use.\n\
 "), stdout);
       fputs (_("\
 \n\
+The WHEN argument defaults to 'always' and can also be 'auto' or 'never'.\n\
+"), stdout);
+      fputs (_("\
+\n\
 Using color to distinguish file types is disabled both by default and\n\
 with --color=never.  With --color=auto, ls emits color codes only when\n\
 standard output is connected to a terminal.  The LS_COLORS environment\n\
-- 
2.32.0

Subject: Man Page: Incorrect Summary of --color Option
From: Pranab Lawrence Ekka Dasgupta <[email-masked]>
To: [email-masked]
Date: Fri, 24 Dec 2021 20:41:45 +0530
List-Id: <debbugs-submit.debbugs.gnu.org>

Version Information
ls/coreutils: 8.32
Distribution: Pop_OS! 20.10

The summary of the `--color` option incorrectly states that the default
option is 'always', whereas it functions otherwise and the information
at the bottom of the man page suggests that the default is 'never'.

This error persists in online manual pages and in other distributions

>From the manual page:

---
       --color[=WHEN]
              colorize  the output; WHEN can be 'always' (default if omitted),
              'auto', or 'never'; more info below

...

       Using  color  to distinguish file types is disabled both by default and
       with --color=never.  With --color=auto, ls emits color codes only  when
---

Thanks and Regards,
Pranab Dasgupta