11# Reference: https://linux.die.net/man/5/pandoc_markdown
22
33if version
4- > % {{ full_name.to_hyphen }}(1) Version {{ version }} | {{ summary }}
4+ > % {{ full_name.to_hyphen }}(1) Version {{ version }} | {{ summary }}
55else
6- > % {{ full_name.to_hyphen }}(1) | {{ summary }}
6+ > % {{ full_name.to_hyphen }}(1) | {{ summary }}
77end
8- > % {{ x_mandoc_authors }}
8+
9+ > % {{ x_mandoc_authors&.for_manpage }}
910> % {{ Date.today.strftime "%B %Y" }}
1011>
1112
@@ -48,8 +49,10 @@ if public_commands.any?
4849 > ==================================================
4950 >
5051 commands.each do |subcommand|
51- > **{{ subcommand.full_name }}**(1)
52- > : {{ subcommand.summary.for_manpage }}
52+ > {{ subcommand.full_name }}
53+ > --------------------------------------------------
54+ >
55+ > {{ subcommand.summary.for_manpage }}
5356 >
5457 end
5558 >
@@ -61,34 +64,38 @@ if args.any?
6164 > ==================================================
6265 >
6366 args.each do |arg|
64- > **{{ arg.name.upcase }}**
65- > :{{ arg.help.for_manpage.indent(4) }}
67+ > {{ arg.name.upcase }}
68+ > --------------------------------------------------
69+ >
70+ > {{ arg.help.for_manpage }}
6671 >
6772 if arg.required
68- > - *Required*
73+ > - *Required*
6974 end
7075 if arg.repeatable
71- > - *Repeatable*
76+ > - *Repeatable*
7277 end
7378 if arg.default
74- > - Default Value: **{{ arg.default }}**
79+ > - Default Value: **{{ arg.default }}**
7580 end
7681 if arg.allowed
77- > - Allowed Values: **{{ arg.allowed.join(', ') }}**
78- end
82+ > - Allowed Values: **{{ arg.allowed.join(', ') }}**
83+ end
7984 >
8085 end
8186
8287 if catch_all.label && catch_all.help
83- > **{{ catch_all.label }}**
88+ > {{ catch_all.label }}
89+ > --------------------------------------------------
90+ >
8491 if catch_all.help
85- > : {{ catch_all.help.for_manpage.indent(4) }}
92+ > {{ catch_all.help.for_manpage }}
8693 >
8794 end
8895 >
8996
9097 if catch_all.required?
91- > - *Required*
98+ > - *Required*
9299 >
93100 end
94101 end
@@ -99,24 +106,26 @@ if flags.any?
99106 > ==================================================
100107 >
101108 flags.each do |flag|
102- > **{{ flag.usage_string }}**
103- > :{{ flag.help.for_manpage.indent(4) }}
109+ > {{ flag.usage_string }}
110+ > --------------------------------------------------
111+ >
112+ > {{ flag.help.for_manpage }}
104113 >
105114
106115 if flag.required
107- > - *Required*
116+ > - *Required*
108117 end
109118 if flag.repeatable
110- > - *Repeatable*
119+ > - *Repeatable*
111120 end
112121 if flag.default
113- > - Default Value: **{{ flag.default }}**
122+ > - Default Value: **{{ flag.default }}**
114123 end
115124 if flag.allowed
116- > - Allowed Values: **{{ flag.allowed.join(', ') }}**
125+ > - Allowed Values: **{{ flag.allowed.join(', ') }}**
117126 end
118127 if flag.conflicts
119- > - Conflicts With: **{{ flag.conflicts.join(', ') }}**
128+ > - Conflicts With: **{{ flag.conflicts.join(', ') }}**
120129 end
121130 >
122131 end
@@ -127,9 +136,11 @@ if dependencies.any?
127136 > ==================================================
128137 >
129138 dependencies.each do |dependency|
130- > **{{ dependency.commands.join ', ' }}**
139+ > {{ dependency.commands.join ', ' }}
140+ > --------------------------------------------------
141+ >
131142 if dependency.help
132- > : {{ dependency.help.for_manpage.indent(4) }}
143+ > {{ dependency.help.for_manpage }}
133144 >
134145 end
135146 >
@@ -141,16 +152,17 @@ if public_environment_variables.any?
141152 > ==================================================
142153 >
143154 public_environment_variables.each do |environment_variable|
144- > **{{ environment_variable.name.upcase }}**
155+ > {{ environment_variable.name.upcase }}
156+ > --------------------------------------------------
145157 >
146- > : {{ environment_variable.help.for_manpage.indent(4) }}
158+ > {{ environment_variable.help.for_manpage }}
147159 >
148160
149161 if environment_variable.required
150- > - *Required*
162+ > - *Required*
151163 end
152164 if environment_variable.default
153- > - Default Value: **{{ environment_variable.default }}**
165+ > - Default Value: **{{ environment_variable.default }}**
154166 end
155167 >
156168 end
@@ -177,5 +189,5 @@ if public_commands.any?
177189 >
178190end
179191
180- = x_mandoc_footer
192+ = x_mandoc_footer&.for_manpage
181193>
0 commit comments