From 25272d0b6244741ba8dbdb3c89878c966cee046b Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sun, 10 Feb 2013 11:07:05 +0000 Subject: Document how --generate-manpage is used in cliapp(5) Suggested-By: Enrico Zini --- cliapp.5 | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) (limited to 'cliapp.5') diff --git a/cliapp.5 b/cliapp.5 index 7950033..2da576c 100644 --- a/cliapp.5 +++ b/cliapp.5 @@ -185,6 +185,49 @@ as set by the application code or determined by automatically. The value of the environment variable is the name of the file to which the resulting profile is to be written. +.SS "Manual page generation" +.B cliapp +can generate parts of a manual page: +the +.I SYNOPSIS +and +.I OPTIONS +sections. +It fills these in automatically based on the subcommand and settings +that a program supports. +Use the +.BR \-\-generate\-manpage =\fIFILE +option, +which is added automatically by +.BR cliapp . +The +.I FILE +is a manual page marked up using +the +.B -man +macros for +.BR troff (1). +It should have empty +.I SYNOPSIS +and +.I OPTIONS +sections, +and +.B cliapp +will fill them in. +The output it to the standard output. +.PP +For example: +.PP +.RS +foo --generate-manpage=foo.1.in > foo.1 +.RE +.PP +You would keep the source code for the manual page in +.I foo.1.in +and have your Makefile produce +.I foo.1 +as shown above. .SH FILES .B cliapp reads a list of configuration files at startup, -- cgit v1.2.1