summaryrefslogtreecommitdiff
path: root/src/lib/libremessages.1.ronn
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-04-15 17:06:52 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-04-15 17:19:47 -0400
commitbd1d554a35b543afa5a79dd483583bf2aad9cf47 (patch)
tree4c93824f367f0d0f95ce4231ee563ed8a865317e /src/lib/libremessages.1.ronn
parent080d2decb7e3aae1917de9d8a7d5089d74833d65 (diff)
libremessages:flag: Fix several things (also librexgettext)
- Fix a bug where it panicked if given an odd number of sub-headings. - Document the the ability to include sub-headings. - Fix librexgettext's handling of it. It only worked correctly for times when it was only called once in a program, or when it was only ever called with exactly one flag/description pair (and no headings).
Diffstat (limited to 'src/lib/libremessages.1.ronn')
-rw-r--r--src/lib/libremessages.1.ronn8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/libremessages.1.ronn b/src/lib/libremessages.1.ronn
index 9a976a8..d4fac85 100644
--- a/src/lib/libremessages.1.ronn
+++ b/src/lib/libremessages.1.ronn
@@ -101,7 +101,7 @@ routines by default.
Similar to `prose`, but prints a bullet point before the first
line, and indents the remaining lines.
- * `flag` <FLAG> <DESCRIPTION> [<FLAG2> <DESCRIPTION2>...]:
+ * `flag` [<FLAG> <DESCRIPTION>|<HEADING>:]...:
Print a flag and description formatted for `--help` text. For
example:<br>
`flag '-N' 'Disable networking in the chroot'`<br>
@@ -113,7 +113,11 @@ routines by default.
whitespace-collapsed (so newlines are stripped), then it is
re-word-wrapped, in the same way as `prose` and `bullet`. If you
pass in multiple flag/description pairs to the same invocation,
- the descriptions are all aligned together.
+ the descriptions are all aligned together. The ability to do
+ insert headings without resetting the alignment is the motivation
+ for also allowing headings to be in the list. In order to tell
+ the difference between a flag and a heading, a heading must end
+ with a colon (':'), and a flag must not.
### NOTIFICATION ROUTINES