Skip to content

Commit

Permalink
doc, test/system: Fix the titles of the manuals
Browse files Browse the repository at this point in the history
Currently, the titles of the manuals are rendered with a pair of empty
parentheses and no section title:
  toolbox(1)()                                              toolbox(1)()

  NAME
         toolbox - Tool for containerized command line environments...

However, they should be:
  toolbox(1)             General Commands Manual              toolbox(1)

  NAME
         toolbox - Tool for containerized command line environments...

This is because the troff generated by go-md2man from Markdown has a
faulty invocation of the .TH macro [1]:
  .nh
  .TH toolbox(1)
  .SH NAME
  .PP
  toolbox - Tool for containerized command line environments on Linux

It should be:
  .nh
  .TH toolbox 1
  .SH NAME
  .PP
  toolbox - Tool for containerized command line environments on Linux

Original patch from Andrew Denton for Podman [2].

[1] https://www.gnu.org/software/groff/manual/groff.html

[2] Podman commit 63c779a857b55b00
    containers/podman#15621

containers#1210
  • Loading branch information
debarshiray committed Jan 12, 2023
1 parent cac6b25 commit 936a157
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion doc/toolbox-create.1.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
% toolbox-create(1)
% toolbox-create 1

## NAME
toolbox\-create - Create a new toolbox container
Expand Down
2 changes: 1 addition & 1 deletion doc/toolbox-enter.1.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
% toolbox-enter(1)
% toolbox-enter 1

## NAME
toolbox\-enter - Enter a toolbox container for interactive use
Expand Down
2 changes: 1 addition & 1 deletion doc/toolbox-help.1.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
% toolbox-help(1)
% toolbox-help 1

## NAME
toolbox\-help - Display help information about Toolbox
Expand Down
2 changes: 1 addition & 1 deletion doc/toolbox-init-container.1.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
% toolbox-init-container(1)
% toolbox-init-container 1

## NAME
toolbox\-init\-container - Initialize a running container
Expand Down
2 changes: 1 addition & 1 deletion doc/toolbox-list.1.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
% toolbox-list(1)
% toolbox-list 1

## NAME
toolbox\-list - List existing toolbox containers and images
Expand Down
2 changes: 1 addition & 1 deletion doc/toolbox-rm.1.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
% toolbox-rm(1)
% toolbox-rm 1

## NAME
toolbox\-rm - Remove one or more toolbox containers
Expand Down
2 changes: 1 addition & 1 deletion doc/toolbox-rmi.1.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
% toolbox-rmi(1)
% toolbox-rmi 1

## NAME
toolbox\-rmi - Remove one or more toolbox images
Expand Down
2 changes: 1 addition & 1 deletion doc/toolbox-run.1.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
% toolbox-run(1)
% toolbox-run 1

## NAME
toolbox\-run - Run a command in an existing toolbox container
Expand Down
2 changes: 1 addition & 1 deletion doc/toolbox.1.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
% toolbox(1)
% toolbox 1

## NAME
toolbox - Tool for containerized command line environments on Linux
Expand Down
2 changes: 1 addition & 1 deletion doc/toolbox.conf.5.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
% toolbox.conf(5)
% toolbox.conf 5

## NAME
toolbox.conf - Toolbox configuration file
Expand Down
3 changes: 2 additions & 1 deletion test/system/002-help.bats
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ setup() {
run $TOOLBOX help

assert_success
assert_line --index 0 --partial "toolbox(1)()"
assert_line --index 0 --partial "toolbox(1)"
assert_line --index 0 --partial "General Commands Manual"
}

@test "help: Run command 'help' with no man present" {
Expand Down

0 comments on commit 936a157

Please sign in to comment.