From f8137811d94088857f2fcbaf6054f4733c680eed Mon Sep 17 00:00:00 2001 From: =?utf8?q?P=C3=A1draig=20Brady?=
Date: Fri, 14 Nov 2025 17:21:00 +0000 Subject: [PATCH] wc: fix missing documentation for the --debug option * doc/coreutils.texi (wc invocation): Desscribe --debug. * src/wc.c (usage): Likewise. * NEWS: Mention the bug fix. --- NEWS | 4 ++++ doc/coreutils.texi | 5 +++++ src/wc.c | 3 +++ 3 files changed, 12 insertions(+) diff --git a/NEWS b/NEWS index 61d7842528..b344452dba 100644 --- a/NEWS +++ b/NEWS @@ -8,6 +8,10 @@ GNU coreutils NEWS -*- outline -*- This also applies to the sha*sum and b2sum utilities. [This bug was present in "the beginning".] + wc now documents its --debug option, currently used to + indicate the line count acceleration being used. + [bug introduced in coreutils-9.0] + * Noteworthy changes in release 9.9 (2025-11-10) [stable] diff --git a/doc/coreutils.texi b/doc/coreutils.texi index 0218a76c84..618889e402 100644 --- a/doc/coreutils.texi +++ b/doc/coreutils.texi @@ -3992,6 +3992,11 @@ Print only the newline character counts. If a file ends in a non-newline character, its trailing partial line is not counted. +@item --debug +@opindex --debug +Output extra information to standard error. +Currently; print the line count acceleration implementation being used. + @item -L @itemx --max-line-length @opindex -L diff --git a/src/wc.c b/src/wc.c index 2433993937..6b46412fb8 100644 --- a/src/wc.c +++ b/src/wc.c @@ -187,6 +187,9 @@ the following order: newline, word, character, byte, maximum line length.\n\ -c, --bytes print the byte counts\n\ -m, --chars print the character counts\n\ -l, --lines print the newline counts\n\ +"), stdout); + fputs (_("\ + --debug indicate what line count acceleration is used\n\ "), stdout); fputs (_("\ --files0-from=F read input from the files specified by\n\ -- 2.47.3