Skip to content

WIP: docs(help): P2a minor-group description alignment (stat/stty/man/top/numfmt/dd/date/time) - #1470

Merged
caomengxuan666 merged 7 commits into
mainfrom
fix/1127-p2a-help-minor
Oct 31, 2026
Merged

caomengxuan666 merged 7 commits into
mainfrom
fix/1127-p2a-help-minor

Conversation

@caomengxuan666

Copy link
Copy Markdown
Member

Refs #1127
Refs #1462

What this is

P2a of the #1127 help-coverage plan: align the minor group's help
descriptions with the oracle tools' own wording density. Wording
and option facts are taken from the oracle sources
(~/workspace/winuxcmd-audit/src: coreutils-9.4 for stat/stty/
numfmt/dd/date, procps-v4.0.4 for top, man-db man.1 for man, GNU time
man page for time) — not from the coverage JSON, which only indexes
what is thin.

Hard rule applied throughout: help never promises an unimplemented
option.
Every expanded description was verified against the
applet's own option parsing / implementation first; GNU clauses that
describe behavior this port does not have were deliberately omitted
(see per-applet notes).

Per-applet changes

  • date (6 descriptions) — -u gains GNU's "print or set"
    (date.c:178); -f becomes GNU's "like --date; once for each line
    of DATEFILE" (date.c:150); -I and --rfc-3339 gain the full
    FMT value lists + examples (date.c:154-158, 168-172; value sets
    verified in iso_format_for/rfc3339_format_for); -R gains
    the RFC 5322 example (date.c:164); --debug dubious→questionable
    (date.c:147). Not added: %g/%G/%k/%l/%U/%V/%W/%::z sequences and
    the % + flag — none are implemented in the formatter, so the
    long description correctly keeps omitting them.
  • numfmt (13 descriptions) — --from/--to/--round/
    --padding/--header/--field/--format/--grouping/
    --from-unit/--to-unit take numfmt.c:911-956 wording.
    --invalid now lists fail (numfmt.c:934) — it was already
    accepted by the validator (numfmt.cpp:684) but undocumented.
    --suffix takes only GNU's first clause: the "accept SUFFIX in
    input numbers" half is not implemented here and stays
    undocumented. --pad marked as the --padding alias it is.
  • stat (4 descriptions) — -L "follow links" (stat.c:1763);
    -c gains "; output a newline after each use of FORMAT"
    (stat.c:1771); --printf gains the no-mandatory-newline clause
    (stat.c:1773-1775; both verified at stat.cpp:1154-1209);
    --cached takes GNU's first clause plus the existing honest
    Windows qualifier (stat.c:1767).
  • dd (7 operand descriptions) — bs/ibs/obs gain "(default:
    512)" and bs gains "overrides ibs and obs" (dd.c:549-556);
    conv/iflag/oflag take dd.c's exact phrases; status expands to
    the LEVEL text already used in the long description, keeping the
    honest progress wording (accepted; final statistics only — GNU's
    periodic-progress clause not claimed). The unimplemented conv
    symbols (ascii/ebcdic/ibm/block/unblock/lcase/ucase/swab) stay
    undocumented.
  • top (12 descriptions) — procps long names are not added
    (the parser accepts only this port's [EXT] long names; renaming/
    adding them is P2b implementation work). The shared short options
    take the fuller wording already used by top's own custom help,
    which tracks procps (top_nls.c:417-436): -b, -d (integer seconds,
    as implemented), -n, -p, -u/-U, -s ("run with secure mode
    restrictions (disables kill/renice)", top.cpp:888), -H, -o
    (with the verified field set CPU|MEM|TIME|PID|NAME,
    top.cpp:847-855), -w, --rows, -v, --help.
  • man (5 descriptions) — the six parsed options only; -w/-P/-t/
    -T/-H take man-db's man.1 wording, keeping the [DIFFERS]
    availability notes (man -P is accepted but the built-in pager is
    always used — now said on the option line too). man-db's other
    modes stay in the [DIFFERS] prose list, undocumented as options.
  • time (1 description + prose) — -p becomes "use the
    portable output format (POSIX 1003.2 style...)" (GNU time man
    page, -p/--portability); long description gains two verified
    facts: three-decimal seconds with the default format's trailing
    's' (format_seconds), and the exit-status contract
    (child status / 127 / 126 / 125 — GNU time EXIT STATUS, mirrored
    by time.cpp's run paths). GNU time's help is mostly the -f
    format list; -f is not implemented, so that text is not
    imported and time's density ceiling is structural.
  • stty — no change. Verified at source level: the three
    option lines are already byte-identical to stty.c:557-559 and the
    settings list tracks stty.c's mode table, restructured honestly
    into effective vs accepted-but-ignored groups. Density is already
    168/160. Churning it would add nothing.

i18n

English strings changed ⇒ 36 catalog keys changed (extract diff
before/after, zero keys outside this scope). Companion PR in
unixwin/winuxcmd-i18n updates the zh-CN translations (34 values;
dd iflag/oflag zh text was already equivalent) and bumps VERSION
0.6.24 → 0.6.25. It merges after this PR.

Standing note: i18n_batch.py validate reports a large key
mismatch that exists identically before this change (legacy.* hash
churn + unrelated applets) — pre-existing drift, not introduced
here; the 36 keys above are all present and consistent.

CI to watch

  • build-winuxcmd (x64 + arm64) — the compile gate; no local MSVC
    build is possible, edits are string-literal-only inside
    OPTION()/REGISTER_COMMAND arguments and were re-parsed by the
    i18n extractor as a structural check.
  • gnu-master-differential — no corpus case invokes --help (verified
    by grep over tests/differential/corpus), so no case flips are
    expected; the standing regressions/70-env noise is unrelated.

Draft until CI is green; Refs-only, does not close #1127 or #1462.

Part of the #1127 P2a help-density pass for the minor group; wording
and option facts taken from the oracle sources (see PR body).
Refs-only.

Refs #1127
Refs #1462
Part of the #1127 P2a help-density pass for the minor group; wording
and option facts taken from the oracle sources (see PR body).
Refs-only.

Refs #1127
Refs #1462
Part of the #1127 P2a help-density pass for the minor group; wording
and option facts taken from the oracle sources (see PR body).
Refs-only.

Refs #1127
Refs #1462
Part of the #1127 P2a help-density pass for the minor group; wording
and option facts taken from the oracle sources (see PR body).
Refs-only.

Refs #1127
Refs #1462
Part of the #1127 P2a help-density pass for the minor group; wording
and option facts taken from the oracle sources (see PR body).
Refs-only.

Refs #1127
Refs #1462
Part of the #1127 P2a help-density pass for the minor group; wording
and option facts taken from the oracle sources (see PR body).
Refs-only.

Refs #1127
Refs #1462
Part of the #1127 P2a help-density pass for the minor group; wording
and option facts taken from the oracle sources (see PR body).
Refs-only.

Refs #1127
Refs #1462
@caomengxuan666
caomengxuan666 marked this pull request as ready for review October 31, 2026 18:43
@caomengxuan666
caomengxuan666 merged commit 3241352 into main Oct 31, 2026
8 of 9 checks passed
@caomengxuan666
caomengxuan666 deleted the fix/1127-p2a-help-minor branch November 2, 2026 01:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

📋 后续工作计划:diff3/sdiff 对齐、help 覆盖修复、测试框架、性能轮

1 participant