summaryrefslogtreecommitdiff
path: root/cliapp.5
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2013-02-10 11:07:05 +0000
committerLars Wirzenius <liw@liw.fi>2013-02-10 11:07:05 +0000
commit25272d0b6244741ba8dbdb3c89878c966cee046b (patch)
tree554e6900405bbfc08a72cb3a02c01f481d204104 /cliapp.5
parent0f0d8df64c465f89c0c3bca000467aca73522114 (diff)
downloadcliapp-25272d0b6244741ba8dbdb3c89878c966cee046b.tar.gz
Document how --generate-manpage is used in cliapp(5)
Suggested-By: Enrico Zini
Diffstat (limited to 'cliapp.5')
-rw-r--r--cliapp.543
1 files changed, 43 insertions, 0 deletions
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,