diff options
author | Lars Wirzenius <liw@liw.fi> | 2013-02-10 11:07:05 +0000 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2013-02-10 11:07:05 +0000 |
commit | 25272d0b6244741ba8dbdb3c89878c966cee046b (patch) | |
tree | 554e6900405bbfc08a72cb3a02c01f481d204104 | |
parent | 0f0d8df64c465f89c0c3bca000467aca73522114 (diff) | |
download | cliapp-25272d0b6244741ba8dbdb3c89878c966cee046b.tar.gz |
Document how --generate-manpage is used in cliapp(5)
Suggested-By: Enrico Zini
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | cliapp.5 | 43 |
2 files changed, 45 insertions, 0 deletions
@@ -32,6 +32,8 @@ Version UNRELEASED * Settings and subcommands may now be hidden from `--help` and `help` output. New option `--help-all` and new subcommand `help-all` show everything. +* cliapp(5) now explains how `--generate-manpage` is used. Thanks to + Enrico Zini for the suggestion. Bug fixes: @@ -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, |