1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-02-10 09:21:58 +02:00
Commit Graph

31130 Commits

Author SHA1 Message Date
Collin Funk
c351e1965d tests: readlink: avoid a false failure on Haiku
* tests/readlink/readlink-posix.sh: Allow the "A" in "Argument" to be
capitalized in return value of strerror (EINVAL).
2026-01-24 12:47:51 +00:00
Collin Funk
be0a448133 doc: NEWS: add a missing quotation mark
* NEWS: Add a closing quotation mark.
2026-01-23 20:15:57 -08:00
Pádraig Brady
bdf53cc685 tests: usage_vs_refs.sh: fix false failure with Alpine
* tests/misc/usage_vs_refs.sh: Fix missing escape on literal {,
required by busybox grep.
Reported by Bruno Haible.
2026-01-23 22:32:20 +00:00
Egmont Koblinger
25fccc7c46 doc: dir,vdir: add dircolors(1) reference to man pages
* man/dir.x: Add dircolors(1) to "SEE ALSO" section.
* man/vdir.x: Likewise.
2026-01-22 16:27:13 +00:00
Pádraig Brady
115a600100 doc: dir,vdir: fix anchor refs from --help
* src/system.h (oputs_): Map from dir,vdir to ls.
2026-01-22 16:23:41 +00:00
Egmont Koblinger
b76c1539ad doc: stat: fix highlighting of --format
* src/stat.c (usage): Add missing comma after -c.
2026-01-22 16:15:26 +00:00
Pádraig Brady
343cae4aed doc: NEWS: minor adjustments
* NEWS: Fix typos, and move item to more appropriate section.
2026-01-22 16:13:26 +00:00
Pádraig Brady
49420ca7d9 doc: pr: fix --help output output
* src/pr.c (usage): Use consistent alignment with -J,
and highlight --pages using oputs().
2026-01-22 13:00:38 +00:00
Pádraig Brady
eaf38a2412 doc: help2man: handle leading '+' in options
* man/help2man: Fix indentation of options with leading '+'.
2026-01-22 12:45:13 +00:00
Pádraig Brady
58ba9580e7 tests: fix false failure with pr -COLS
* tests/misc/usage_vs_getopt.sh: Fix false failure induced
by commit v9.9-239-ga06f0cf67
2026-01-22 11:56:50 +00:00
Pádraig Brady
87219034b7 doc: use TERM=dumb rather than HELP_NO_MARKUP to disable markup
This is a more standard mechanism to disable markup.

* src/system.h (oputs_): Logic change to honor TERM=dumb,
rather than HELP_NO_MARKUP=something.
* doc/coreutils.texi: Adjust the description for --help.
* man/local.mk: Ensure TERM is set to something,
so that man pages have links included.
* man/viewman: Just honor users $TERM.
* tests/misc/getopt_vs_usage.sh: Remove env var complication,
as TERM is unset automatically.
* tests/misc/usage_vs_refs.sh: Likewise.
* NEWS: Adjust the change in behavior note.
2026-01-22 11:42:47 +00:00
Pádraig Brady
bdc45990c7 tests: avoid false failure with non standard path
* tests/misc/usage_vs_refs.sh: Properly quote arguments
to avoid false failure with paths containing spaces etc.
2026-01-21 19:30:21 +00:00
Pádraig Brady
3e57f08e36 tests: avoid infinite loop in dd failure edge case
* tests/tee/tee.sh: If dd failed, then tee would spin
writing to the fifo forever, so add a timeout protection.
This was noticed with `export LD_PRELOAD=libasan.so.8`
with a non ASAN build, which induced a failure in dd invocations.
2026-01-21 19:00:03 +00:00
Pádraig Brady
f9eebda93c tests: avoid false failure with sanitizer builds
* init.cfg (sanitizer_build_): Add a helper to detect if a program
is built against a sanitizer.
* tests/df/no-mtab-status-masked-proc.sh: Skip if a sanitizer build.
2026-01-21 17:49:39 +00:00
Pádraig Brady
28c29d103e stat,tail: sync with latest Linux file systems
* src/stat.c (human_fstype): Add "guest-memfd".
* NEWS: Mention the improvement.
2026-01-21 16:29:03 +00:00
Pádraig Brady
92df52d791 tests: avoid false failure on setgid dir
* tests/misc/mknod.sh: Skip a portion of the test
in the edge case of setgid directories.
2026-01-21 16:06:51 +00:00
Pádraig Brady
dfeb32f6e2 ls: --hyperlink: switch to more standard delimiters
* src/ls.c (quote_name): Use ST (ESC \) rather than BEL,
as that's the only terminator mentioned in at least
ECMA-48, DEC STD 070, and EK-VT520-RM.
* NEWS: Mention the change in behavior.
* tests/ls/hyperlink.sh: Adjust accordingly.

Suggested by Egmont Koblinger.
2026-01-21 14:05:48 +00:00
Pádraig Brady
77e6b5d8f8 tests: ensure there is an anchor for each --help option
* tests/misc/usage_vs_refs.sh: A new test to correlation options
listed in --help, and anchors referenced in the texinfo (html) manual.
* tests/local.mk: Add the new test.
2026-01-21 14:05:48 +00:00
Pádraig Brady
7dfe08316d doc: NEWS: describe the --help markup configuration options
* NEWS: Mention build and runtime config options.
2026-01-21 14:05:48 +00:00
Pádraig Brady
d6a81caafc doc: adjust --help hyperlinks to more standard format
* src/system.h (oputs_): Use ST rather than BEL.
2026-01-21 13:51:58 +00:00
Pádraig Brady
2753931590 doc: add commentary on details of --help references
* src/system.h: Mention why we don't bother with (the overhead of)
hostnames in these URLs, and why --help,--version link are special.
2026-01-21 13:51:58 +00:00
Pádraig Brady
49cabb6845 doc: cp: group related -HLP descriptions
* src/cp (usage): The -HLP options are close
in functionality and close alphabetically, so describe together.
* doc/coreutils.texi (cp invocation): Likewise.
2026-01-21 13:51:58 +00:00
Pádraig Brady
c666aa7461 doc: cp: document --keep-directory-symlink in correct location
* src/cp.c (usage): Move to alphabetically in list.
* doc/coreutils.texi (mv invocation): Move description from here ...
(cp invocation): ... to here.
2026-01-21 13:51:58 +00:00
Pádraig Brady
af61d818f8 doc: ls: document --block-size in the manual
* doc/coreutils.texi (ls invocation): Document --block-size
2026-01-21 13:51:58 +00:00
Pádraig Brady
9a10b354ec doc: who: document --users in manual
* doc/coreutils.texi (who invocation): Mention that --users
is equivalent to -u.
* src/who.c (usage): Mention -u shows idle time.
2026-01-21 13:51:58 +00:00
Pádraig Brady
1d1539a529 doc: id: document -a in manual
* doc/coreutils.texi (id invocation): Mention this option is ignored.
2026-01-21 13:51:58 +00:00
Pádraig Brady
a06f0cf67e doc: more indexing fixes in manual
* doc/coreutils.texi: Add missing anchors.
* src/pr.c (Usage): Adjust to use -COLS, to avoid a clash
with the additional anchor added to the manual.
Also markup the --columns option as done for other options.
* tests/split/line-bytes.sh: Also fix --lines-bytes typo here.
2026-01-21 13:51:58 +00:00
Egmont Koblinger
5de8835672 doc: tty: fix indexing in texinfo
* doc/coreutils.texi: Fix recently introduced typo.
* THANKS.in: Remove as now committed to the repo.
2026-01-21 13:51:58 +00:00
Pádraig Brady
7426643f39 doc: make legacy digest utility --help reference cksum nodes
* src/system.h (oputs_): Map md5sum etc. to cksum urls,
as we only have cksum anchors in the manual to avoid
creating anchors for all of the legacy digest utilities.
2026-01-21 13:51:58 +00:00
Pádraig Brady
1e72a54ca7 doc: tweak tests to avoid false failure with --help
* tests/df/df-output.sh: Use a more relaxed match.
* tests/du/inodes.sh: Likewise.
2026-01-21 13:51:40 +00:00
Pádraig Brady
2dad24adc0 doc: all: use option highlighting and more standard alignment
Adjust all utils to:
  - Have a separate translation per option
  - Use either oputs() or oprintf(), instead of fputs() or printf().
  - Use more standard alignment as discussed in previous commits.
  - Various tweaks to descriptions.
2026-01-21 13:51:40 +00:00
Pádraig Brady
0f5ab6cb8b doc: readlink: improve option ordering in texinfo
* doc/coreutils.texi (readlink invocation): Order -q,-s alphabetically.
2026-01-21 13:51:40 +00:00
Pádraig Brady
1cbfdce425 doc: chcon: use more standard -HLP desciptions
* src/chcon.c (usage): Use emit_symlink_recurse_options ("-P").
2026-01-21 13:51:40 +00:00
Pádraig Brady
e73d594374 doc: highlight -HLP options
* src/system.h (emit_symlink_recurse_options): Highlight -HLP,
for chmod, chcon etc.
2026-01-21 13:51:40 +00:00
Pádraig Brady
e9d398e221 doc: put --help and --version descriptions on separate line
* src/system.h: This aligns the output with the option
description format used in most commands
2026-01-21 13:51:39 +00:00
Pádraig Brady
cab15fc4ef doc: ls: put option description on separate line to option
* src/ls.c (usage): This is less constrained when writing comments,
and more consistent in output alignment.  There is less delineation
between options and descripts, but given options are highlighted
by default now, this is a more appropriate format to use.
Note consistently showing description on the line following the option,
avoids any issue with the user needing to visually line up
the option with a description far to the right.
Note this format more closely aligns with that used in man pages.
2026-01-21 13:51:39 +00:00
Pádraig Brady
3950891eaa doc: viewman: a new helper to quickly view formatted man pages
Use like: man/viewman ls

* man/viewman: Generate man page on the fly, and view.
2026-01-21 13:51:39 +00:00
Pádraig Brady
5939e67704 doc: help2man: account for undisplayed markup in indenting calculations
* man/help2man: This is significant with the indented line
following the dd bs=BYTES "option" at least.
2026-01-21 13:51:39 +00:00
Pádraig Brady
ed91d9a218 doc: help2man: convert all hyperlinks, not just ones in --options
* man/help2man: Make the (--?) part of the match optional.
Note we still extract the dashes, to support the existing
option matching logic in help2man.
2026-01-21 13:51:39 +00:00
Pádraig Brady
f0705a83f6 doc: help2man: support alternate format OSC hyperlinks
* man/help2man: The BEL terminator format was already supported.
Add support for ESC + backslash terminator.  Also split out
and document the regular expression.
2026-01-21 13:51:39 +00:00
Pádraig Brady
e2fdbea10a doc: help2man: convert OSC hyperlinks
* man/help2man: Convert OSC hyperlinks to roff \X escapes,
which will be converted back to OSC hyperlinks when
the man page is displayed on the terminal.
Note formatting is removed from hyperlinked text by default,
thus relying on how the terminal highlights hyperlinks,
but --bold-refs is honored in this case, in which hyperlinked
text will be marked up as bold, which matches the default
markup used for non hyperlinked options.
2026-01-21 13:51:39 +00:00
Pádraig Brady
d06a666429 doc: help2man: recognise option description with smaller indent
* man/help2man: Allow for a smaller indented option description.
This smaller indentation is present in timeout --help output,
so now the line spacing in timeout.1 is more consistent.
Also having the description on a separate line with
a smaller indentation, is a more general way to present
option descriptions (and what the man page formatting uses already).
We'll be changing many utilities, especially with longer multi-line
descriptions to this new format.
2026-01-21 13:51:39 +00:00
Pádraig Brady
5a21df35b0 doc: help2man: strip ANSI codes
* man/help2man: With these ANSI codes, output is corrupted,
so it's best to strip these, which allows --help to
outputting formatting and hyperlinks by default.
2026-01-21 13:51:39 +00:00
Pádraig Brady
507252c6f2 doc: support highlighting printf formatted options
* src/system.h (oprintf): Add a printf wrapper that
calls oputs_() to markup the formatted text.
2026-01-21 13:51:39 +00:00
Pádraig Brady
d8df94bc02 doc: support more general option matching
* src/system.h: Support "-p DIR, --tmpdir[=DIR]" option.
Previously only the "-p" was highlighted.
Support highlighting dd option syntax (no '-').
Support test(1) "FILE1 -nt FILE2" syntax.
2026-01-21 13:51:39 +00:00
Pádraig Brady
3ec554d4dd doc: parse any whitespace as an option/description delimiter
* src/system.c (oputs_): Use isspace() rather than hardcoding.
Note we don't use c_isspace() as we need to support anything
coming from translations.
2026-01-21 13:51:39 +00:00
Pádraig Brady
cc002057b3 doc: optimize logic to disable SGR output in --help
* src/system.h (oputs_): Simplify processing if neither
MANUAL_URL or BOLD_MAN_REFS is defined.  Also ensure
we only lookup the HELP_NO_MARKUP env var once per process.
2026-01-21 13:51:39 +00:00
Pádraig Brady
4555132f3c doc: move oputs() to system.h to support all commands
* src/ls.c: Move non ls specific helper to ...
* src/system.h: ... here.
2026-01-21 13:51:39 +00:00
Pádraig Brady
5c6cb2b26b doc: support a configurable manual url
* configure.ac: Support ./configure --enable-manual-url=...
* src/ls.c (oputs): Adjust accordingly.
2026-01-21 13:51:39 +00:00
Pádraig Brady
deba7a673d doc: --help: --disable-bold-man-page-references configures bold refs
* configure.ac: Adjust help text for --disable-bold-man-page-references,
and also define BOLD_MAN_REFS.
* src/ls.c (oputs): Output bold iff BOLD_MAN_REFS is defined.
2026-01-21 13:51:39 +00:00