readlink: improve documentation for POSIXLY_CORRECT in --help

* NEWS: Improve wording to not imply POSIXLY_CORRECT=1 readlink -q will
be verbose.
* src/readlink.c (usage): Mention the affect of POSIXLY_CORRECT on
-s (--silent), -q (--quiet), and -v (--verbose) in the help message.
(main): Remove spurious newline added by previous commit.
* doc/coreutils.texi (readlink invocation): Mention that -s (--silent)
and -q (--quiet) are not the default when POSIXLY_CORRECT is set.
This commit is contained in:
Collin Funk committed 2025-08-03 12:33:55 -07:00
1 parent ecd803805d
commit 2ff3c65e94
3 files changed
+11 -6

No files matched your search

+2 -2
View File
@@ -7,8 +7,8 @@ GNU coreutils NEWS -*- outline -*-
'factor' is now much faster at identifying large prime numbers,
and significantly faster on composite numbers greater than 2^128.
readlink will behave as if the -v option is used if the
POSIXLY_CORRECT environment variable is defined.
readlink now defaults to being verbose if the POSIXLY_CORRECT
environment variable is set.
** Bug fixes
+5 -1
View File
@@ -11462,7 +11462,11 @@ Print a warning if specified along with multiple @var{file}s.
@opindex -q
@opindex --silent
@opindex --quiet
Suppress most error messages. On by default.
Suppress most error messages.
@vindex POSIXLY_CORRECT
This option is on by default if the @env{POSIXLY_CORRECT} environment
variable is not set.
@item -v
@itemx --verbose
+4 -3
View File
@@ -78,8 +78,10 @@ usage (int status)
without requirements on components existence\n\
-n, --no-newline do not output the trailing delimiter\n\
-q, --quiet\n\
-s, --silent suppress most error messages (on by default)\n\
-v, --verbose report error messages\n\
-s, --silent suppress most error messages (on by default\n\
if POSIXLY_CORRECT is not set)\n\
-v, --verbose report error messages (on by default if\n\
POSIXLY_CORRECT is set)\n\
-z, --zero end each output line with NUL, not newline\n\
"), stdout);
fputs (HELP_OPTION_DESCRIPTION, stdout);
@@ -163,7 +165,6 @@ main (int argc, char **argv)
char *value = (can_mode != -1
? canonicalize_filename_mode (fname, can_mode)
: areadlink_with_size (fname, 63));
if (value)
{
fputs (value, stdout);