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:
authorjarro2783 <jarro.2783@gmail.com>2022-09-25 23:59:38 +0300
committerGitHub <noreply@github.com>2022-09-25 23:59:38 +0300
commit2123115f71f05846ec786d46ae34fc9666d2e165 (patch)
tree7a97cb62d8bfa91a795e453d980edf51033fca58
parentd046fe0ad6acab5dbe0dcbc9457cad8fada8b288 (diff)
Improve positional help description.
Minor change to the positional option description in README.
-rw-r--r--README.md7
1 files changed, 5 insertions, 2 deletions
diff --git a/README.md b/README.md
index c5cb132..de69e5a 100644
--- a/README.md
+++ b/README.md
@@ -139,10 +139,13 @@ options.add_options()
("server", "The server to execute on", cxxopts::value<std::string>())
("filenames", "The filename(s) to process", cxxopts::value<std::vector<std::string>>());
-options.parse_positional({"script", "server", "filenames"})
+options.parse_positional({"script", "server", "filenames"});
+
+// Parse options the usual way
+options.parse(argc, argv);
```
-Then parsing a set of arguments like:
+For example, parsing the following arguments:
~~~
my_script.py my_server.com file1.txt file2.txt file3.txt
~~~