Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/jarro2783/cxxopts.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJarryd Beck <jarro.2783@gmail.com>2016-01-27 23:26:10 +0300
committerJarryd Beck <jarro.2783@gmail.com>2016-01-27 23:26:10 +0300
commitaec97a6f53c3486fc51e0d9857f10b683180d668 (patch)
tree4d240ac786491a73c6a89f2afa0a27831818725a /README.md
parent5a7585026db3d5232affe2578ca3b52126bc9e09 (diff)
update readme
Diffstat (limited to 'README.md')
-rw-r--r--README.md15
1 files changed, 12 insertions, 3 deletions
diff --git a/README.md b/README.md
index f7022fb..dbffee8 100644
--- a/README.md
+++ b/README.md
@@ -24,7 +24,7 @@ Create a cxxopts::Options instance.
cxxopts::Options options;
-Then use add_options.
+Then use `add_options`.
options.add_options()
("d,debug", "Enable debugging")
@@ -46,13 +46,22 @@ it appeared, and
to get its value. If "opt" doesn't exist, or isn't of the right type, then an
exception will be thrown.
+## Help groups
+
+Options can be placed into groups for the purposes of displaying help messages.
+To place options in a group, pass the group as a string to `add_options`. Then,
+when displaying the help, pass the groups that you would like displayed as a
+vector to the `help` function.
+
## Positional Arguments
-Positional arguments can be optionally parsed into one or more options. To set up positional arguments, call
+Positional arguments can be optionally parsed into one or more options.
+To set up positional arguments, call
options.parse_positional({"first", "second", "last"})
-where "last" should be the name of an option with a container type, and the others should have a single value.
+where "last" should be the name of an option with a container type, and the
+others should have a single value.
# Linking