Fix whatis info in manpage

whatis relies on a specific format in the NAME section: command name,
hyphen, description. This fixes the generator so that it produces a
valid NAME section.

Signed-off-by: Stephen Kitt <steve@sk2.org>
This commit is contained in:
Stephen Kitt 2019-09-13 08:55:15 +02:00
parent ac4b5a157d
commit eab3ca8550
No known key found for this signature in database
GPG key ID: 80D302F5886D839C
2 changed files with 3 additions and 3 deletions

View file

@ -17,7 +17,7 @@ def main
print make_top
print make_section('NAME', [
"Miller is like awk, sed, cut, join, and sort for name-indexed data such as CSV and tabular JSON."
"miller \\\- like awk, sed, cut, join, and sort for name-indexed data such as CSV and tabular JSON."
])
print make_section('SYNOPSIS', [
@ -224,7 +224,7 @@ def groff_encode(line)
#line = line.gsub(/"/, '\(dq')
#line = line.gsub(/\./, '\&')
#line = line.gsub(/-/, '\-')
line = line.gsub(/\\/, '\e')
line = line.gsub(/\\([^-])/, '\e\1')
line = line.gsub(/^\./){'\&.'}
line
end

View file

@ -26,7 +26,7 @@
.\" -----------------------------------------------------------------
.SH "NAME"
.sp
Miller is like awk, sed, cut, join, and sort for name-indexed data such as CSV and tabular JSON.
miller \- like awk, sed, cut, join, and sort for name-indexed data such as CSV and tabular JSON.
.SH "SYNOPSIS"
.sp
Usage: mlr [I/O options] {verb} [verb-dependent options ...] {zero or more file names}