-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
On macOS, `makewhatis` fails to parse `NAME` headings in man pages if there's a newline between `.SH` and `NAME`. This is silly, but I can't exactly get them to update it: ``` $ /usr/libexec/makewhatis -v -o /tmp/whatis outputs/out/share/man | head man directory outputs/out/share/man outputs/out/share/man/man5 reading outputs/out/share/man/man5/nix.conf.5 ignoring junk description "" reading outputs/out/share/man/man5/nix-profiles.5 ignoring junk description "" ``` Through a circuitous sequence of events, this results in shell completions for the `man` command being broken in Fish for man pages generated with Lowdown: https://git.lix.systems/lix-project/lix/issues/515 This patch, then, replaces the trailing newline after blocks with a trailing space for `.SH` blocks which only contain normal text in `nroff` output. The restriction that `.SH` blocks only contain normal text is because (for example) this doesn't render correctly: ``` .SH a \fIhttps://foo.com\fR now \fBworld\fR <\fIhttps://bar.com\fR> b ```
- Loading branch information
Showing
6 changed files
with
31 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
.\" -*- mode: troff; coding: utf-8 -*- | ||
.TH "" "7" "" | ||
.SH | ||
section | ||
.SH section | ||
.LP | ||
body |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
.\" -*- mode: troff; coding: utf-8 -*- | ||
.TH "" "7" "" | ||
.SH | ||
section | ||
.SH section | ||
.LP | ||
body |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
.SH | ||
header 1 | ||
.SH header 1 | ||
.LP | ||
1 | ||
.SH | ||
header 2 | ||
.SH header 2 | ||
.LP | ||
2 | ||
.SS | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
.SH | ||
header 1 | ||
.SH header 1 | ||
.LP | ||
1 | ||
.SS | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
.SH | ||
An h1 header | ||
.SH An h1 header | ||
.LP | ||
Paragraphs are separated by a blank line. | ||
.PP | ||
|