From 74fff9901d9529cdde4ed42254aa21afe466ac3a Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sat, 24 Mar 2018 13:00:05 +0200 Subject: Add --keep-separator option --- cli/options.cxx | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'cli/options.cxx') diff --git a/cli/options.cxx b/cli/options.cxx index 68b964b..0a9c0e4 100644 --- a/cli/options.cxx +++ b/cli/options.cxx @@ -680,6 +680,7 @@ options () option_prefix_specified_ (false), option_separator_ ("--"), option_separator_specified_ (false), + keep_separator_ (), include_with_brackets_ (), include_prefix_ (), include_prefix_specified_ (false), @@ -815,6 +816,7 @@ options (int& argc, option_prefix_specified_ (false), option_separator_ ("--"), option_separator_specified_ (false), + keep_separator_ (), include_with_brackets_ (), include_prefix_ (), include_prefix_specified_ (false), @@ -953,6 +955,7 @@ options (int start, option_prefix_specified_ (false), option_separator_ ("--"), option_separator_specified_ (false), + keep_separator_ (), include_with_brackets_ (), include_prefix_ (), include_prefix_specified_ (false), @@ -1091,6 +1094,7 @@ options (int& argc, option_prefix_specified_ (false), option_separator_ ("--"), option_separator_specified_ (false), + keep_separator_ (), include_with_brackets_ (), include_prefix_ (), include_prefix_specified_ (false), @@ -1231,6 +1235,7 @@ options (int start, option_prefix_specified_ (false), option_separator_ ("--"), option_separator_specified_ (false), + keep_separator_ (), include_with_brackets_ (), include_prefix_ (), include_prefix_specified_ (false), @@ -1367,6 +1372,7 @@ options (::cli::scanner& s, option_prefix_specified_ (false), option_separator_ ("--"), option_separator_specified_ (false), + keep_separator_ (), include_with_brackets_ (), include_prefix_ (), include_prefix_specified_ (false), @@ -1594,6 +1600,8 @@ print_usage (::std::ostream& os, ::cli::usage_para p) os << "--option-separator Use instead of the default '--' as an" << ::std::endl << " optional separator between options and arguments." << ::std::endl; + os << "--keep-separator Leave the option separator in the scanner." << ::std::endl; + os << "--include-with-brackets Use angle brackets (<>) instead of quotes (\"\") in" << ::std::endl << " the generated #include directives." << ::std::endl; @@ -1823,6 +1831,8 @@ struct _cli_options_map_init _cli_options_map_["--option-separator"] = &::cli::thunk< options, std::string, &options::option_separator_, &options::option_separator_specified_ >; + _cli_options_map_["--keep-separator"] = + &::cli::thunk< options, bool, &options::keep_separator_ >; _cli_options_map_["--include-with-brackets"] = &::cli::thunk< options, bool, &options::include_with_brackets_ >; _cli_options_map_["--include-prefix"] = -- cgit v1.1