diff options
author | jarro2783 <jarro.2783@gmail.com> | 2022-09-25 23:59:38 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-25 23:59:38 +0300 |
commit | 2123115f71f05846ec786d46ae34fc9666d2e165 (patch) | |
tree | 7a97cb62d8bfa91a795e453d980edf51033fca58 | |
parent | d046fe0ad6acab5dbe0dcbc9457cad8fada8b288 (diff) |
Improve positional help description.
Minor change to the positional option description in README.
-rw-r--r-- | README.md | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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 ~~~ |