From 2123115f71f05846ec786d46ae34fc9666d2e165 Mon Sep 17 00:00:00 2001 From: jarro2783 Date: Mon, 26 Sep 2022 06:59:38 +1000 Subject: [PATCH] Improve positional help description. --- README.md | 7 +++++-- 1 file 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()) ("filenames", "The filename(s) to process", cxxopts::value>()); -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 ~~~ -- libgit2 0.21.4