Skip to content

Commit 0df2f89

Browse files
committed
Log sharkdp/hyperfine#870: man page font escape and reference flags
1 parent 5dd6677 commit 0df2f89

1 file changed

Lines changed: 72 additions & 0 deletions

File tree

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# sharkdp/hyperfine — man page font escape and reference flags
2+
3+
| Field | Value |
4+
|---|---|
5+
| Target | [sharkdp/hyperfine](https://github.com/sharkdp/hyperfine) |
6+
| PR | [#870](https://github.com/sharkdp/hyperfine/pull/870) |
7+
| Opened | 2026-04-21 |
8+
| Status | open |
9+
10+
## What
11+
12+
Two small fixes in `doc/hyperfine.1`, 12 insertions / 2 deletions, one file.
13+
14+
1. **Font escape typo in `--command-name`.** Lines 312 and 314 used
15+
`\fi` (lowercase i) where `\fI` is intended. Lowercase is not a
16+
valid groff font-inline escape. Both `groff -Tutf8 -ww` and
17+
`mandoc -Tlint` flag it:
18+
19+
```
20+
troff: warning: cannot select font 'i'
21+
mandoc: WARNING: invalid escape sequence: \fi
22+
```
23+
24+
With `\fI`, `NAME` in the rendered man page is italicized as the
25+
surrounding prose expects.
26+
27+
2. **`--reference` and `--reference-name` missing from OPTIONS.** Both
28+
flags are defined in `src/cli.rs` at lines 90 and 100, shipped in
29+
1.18.0 and 1.19.0 respectively, and shown by `hyperfine --help`,
30+
but the man page never caught up. Inserted the two entries between
31+
`--setup` and `--prepare` to match their position in `--help`.
32+
Wording mirrors the `.help()` strings in `cli.rs`.
33+
34+
## Why
35+
36+
Scouted cold by reading `doc/hyperfine.1` against `src/cli.rs`. The
37+
font-escape bug is user-visible in every installed copy of the man
38+
page. The flag-documentation gap is common drift for clap-backed CLIs
39+
whose man pages are hand-maintained.
40+
41+
Complements PR #839 (open), which documents the same flags in the
42+
README but not the man page.
43+
44+
## Tests
45+
46+
- `groff -Tutf8 -ww doc/hyperfine.1` after patch: no warnings.
47+
Before patch: two `cannot select font 'i'` warnings.
48+
- `mandoc -Tlint doc/hyperfine.1`: remaining non-STYLE warnings are
49+
pre-existing (`.RE` at end-of-file, empty `.IP` macros) and not
50+
touched by this PR.
51+
- Rendered the patched file with `mandoc -Tutf8` and eyeballed both
52+
new flag entries and the fixed `--command-name` entry. NAME is
53+
italicized, both reference flags appear in order with proper
54+
formatting.
55+
56+
## Review
57+
58+
No review yet.
59+
60+
## Lesson
61+
62+
- When verifying man-page drift, grep with awareness of groff's
63+
escape sequences. Backslash-dash (`\-`) is the canonical escape for
64+
hyphens, so plain `--flag` will miss entries written as
65+
`\-\-flag`. A blind grep on my first candidate (sharkdp/fd) falsely
66+
reported three flags missing that were in fact already documented.
67+
Always sanity-check by also searching for the underscore form and
68+
by eyeballing the rendered output with `mandoc -Tutf8`.
69+
- Agent-scouted candidates need a re-verification pass. Scouts rank
70+
candidates at speed; the cost of a false positive is a wasted fork
71+
and a near-filed wrong PR. Treat the scout's "defect" claim as a
72+
hypothesis, not a fact.

0 commit comments

Comments
 (0)