diff --git a/README.md b/README.md index 603e435..fae283b 100644 --- a/README.md +++ b/README.md @@ -195,14 +195,23 @@ therefore, `-o false` does not work. Parsing a list of values into a `std::vector` is also supported, as long as `T` can be parsed. To separate single values in a list the define symbol `CXXOPTS_VECTOR_DELIMITER` -is used, which is ',' by default. Ensure that you use no whitespaces between values because -those would be interpreted as the next command line option. Example for a command line option +is used, which is ',' by default. Ensure that you use no whitespaces between values +(unless the entire list is double quoted) because those would be interpreted as the +next command line option. Example for a command line option that can be parsed as a `std::vector`: ~~~ --my_list=1,-2.1,3,4.5 ~~~ +If the list of values is quoted, then spaces can be included. For example: + +~~~ +--my_list="review,memory sanitize,build help,reformat" +~~~ + +This will be parsed into `review`, `memory sanitize`, `build help`, and `reformat`. + ## Options specified multiple times The same option can be specified several times, with different arguments, which will all