summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-01-18 12:53:31 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-01-18 12:53:31 +0200
commita51e4faad87e0b18a14c4cb6c7b5796ad0467c11 (patch)
tree0f622319cd6fb208b14595f03f6acc81400006d6 /cli
parent5a01a260c368d3045f0870cc09620a772027e911 (diff)
Stop quoting \c in plain text
The recommended approach is to quote manually and only values that can be genuinely confused for being part of the text. For example, '-', '/', etc.
Diffstat (limited to 'cli')
-rw-r--r--cli/context.cxx10
-rw-r--r--cli/options.cli16
-rw-r--r--cli/options.cxx30
3 files changed, 23 insertions, 33 deletions
diff --git a/cli/context.cxx b/cli/context.cxx
index 25a88a0..e245dea 100644
--- a/cli/context.cxx
+++ b/cli/context.cxx
@@ -702,11 +702,6 @@ format_line (output_type ot, string& r, const char* s, size_t n)
if (b & itlc)
r += "\033[4m";
}
- else
- {
- if (b & code)
- r += "'";
- }
}
break;
@@ -830,11 +825,6 @@ format_line (output_type ot, string& r, const char* s, size_t n)
if (eb & itlc)
r += "\033[4m";
}
- else
- {
- if (b & code)
- r += "'";
- }
}
break;
diff --git a/cli/options.cli b/cli/options.cli
index 20e1987..26bf834 100644
--- a/cli/options.cli
+++ b/cli/options.cli
@@ -181,7 +181,7 @@ class options
"Use ANSI color escape sequences when printing usage. By \"color\" we
really only mean the bold and underline modifiers. Note that Windows
console does not recognize ANSI escape sequences and will display
- them as garbage. However, if you pipe such output through \c{\b{less}(1)},
+ them as garbage. However, if you pipe such output through \cb{less(1)},
it will display them correctly."
};
@@ -456,7 +456,7 @@ class options
std::string --option-prefix = "-"
{
"<prefix>",
- "Use <prefix> instead of the default \cb{-} as an option prefix. Unknown
+ "Use <prefix> instead of the default '\cb{-}' as an option prefix. Unknown
command line arguments that start with this prefix are treated as unknown
options. If you set the option prefix to the empty value, then all the
unknown command line arguments will be treated as program arguments."
@@ -465,16 +465,16 @@ class options
std::string --option-separator = "--"
{
"<sep>",
- "Use <sep> instead of the default \cb{--} as an optional separator between
- options and arguments. All the command line arguments that are parsed
- after this separator are treated as program arguments. Set the option
- separator to the empty value if you don't want this functionality."
+ "Use <sep> instead of the default '\cb{--}' as an optional separator
+ between options and arguments. All the command line arguments that are
+ parsed after this separator are treated as program arguments. Set the
+ option separator to the empty value if you don't want this functionality."
};
bool --include-with-brackets
{
- "Use angle brackets (<>) instead of quotes (\"\") in the generated
- \cb{#include} directives."
+ "Use angle brackets (\cb{<>}) instead of quotes (\cb{\"\"}) in the
+ generated \cb{#include} directives."
};
std::string --include-prefix
diff --git a/cli/options.cxx b/cli/options.cxx
index 0be47dc..562a789 100644
--- a/cli/options.cxx
+++ b/cli/options.cxx
@@ -1336,7 +1336,7 @@ print_usage (::std::ostream& os, ::cli::usage_para p)
os << "--version Print version and exit." << ::std::endl;
- os << "--include-path|-I <dir> Search <dir> for bracket-included ('<>') options" << ::std::endl
+ os << "--include-path|-I <dir> Search <dir> for bracket-included (<>) options" << ::std::endl
<< " files." << ::std::endl;
os << "--output-dir|-o <dir> Write the generated files to <dir> instead of the" << ::std::endl
@@ -1351,21 +1351,21 @@ print_usage (::std::ostream& os, ::cli::usage_para p)
os << "--generate-specifier Generate functions for determining whether the" << ::std::endl
<< " option was specified on the command line." << ::std::endl;
- os << "--generate-parse Generate 'parse()' functions instead of parsing" << ::std::endl
+ os << "--generate-parse Generate parse() functions instead of parsing" << ::std::endl
<< " constructors." << ::std::endl;
os << "--generate-description Generate the option description list that can be" << ::std::endl
<< " examined at runtime." << ::std::endl;
- os << "--generate-file-scanner Generate the 'argv_file_scanner' implementation." << ::std::endl;
+ os << "--generate-file-scanner Generate the argv_file_scanner implementation." << ::std::endl;
os << "--suppress-inline Generate all functions non-inline." << ::std::endl;
os << "--cli-namespace <ns> Generate the CLI support types in the <ns>" << ::std::endl
- << " namespace ('cli' by default)." << ::std::endl;
+ << " namespace (cli by default)." << ::std::endl;
os << "--ostream-type <type> Output stream type instead of the default" << ::std::endl
- << " 'std::ostream' that should be used to print usage" << ::std::endl
+ << " std::ostream that should be used to print usage" << ::std::endl
<< " and exception information." << ::std::endl;
os << "--generate-cxx Generate C++ code." << ::std::endl;
@@ -1388,8 +1388,8 @@ print_usage (::std::ostream& os, ::cli::usage_para p)
os << "--long-usage If no short documentation string is provided, use" << ::std::endl
<< " the complete long documentation string in usage." << ::std::endl;
- os << "--short-usage If specified together with '--long-usage'," << ::std::endl
- << " generate both short and long usage versions." << ::std::endl;
+ os << "--short-usage If specified together with --long-usage, generate" << ::std::endl
+ << " both short and long usage versions." << ::std::endl;
os << "--page-usage <name> Generate the combined usage printing code for the" << ::std::endl
<< " entire page." << ::std::endl;
@@ -1493,22 +1493,22 @@ print_usage (::std::ostream& os, ::cli::usage_para p)
os << "--output-suffix <suffix> Add <suffix> at the end of the generated output" << ::std::endl
<< " file name(s)." << ::std::endl;
- os << "--hxx-suffix <suffix> Use <suffix> instead of the default '.hxx' to" << ::std::endl
+ os << "--hxx-suffix <suffix> Use <suffix> instead of the default .hxx to" << ::std::endl
<< " construct the name of the generated header file." << ::std::endl;
- os << "--ixx-suffix <suffix> Use <suffix> instead of the default '.ixx' to" << ::std::endl
+ os << "--ixx-suffix <suffix> Use <suffix> instead of the default .ixx to" << ::std::endl
<< " construct the name of the generated inline file." << ::std::endl;
- os << "--cxx-suffix <suffix> Use <suffix> instead of the default '.cxx' to" << ::std::endl
+ os << "--cxx-suffix <suffix> Use <suffix> instead of the default .cxx to" << ::std::endl
<< " construct the name of the generated source file." << ::std::endl;
- os << "--man-suffix <suffix> Use <suffix> instead of the default '.1' to" << ::std::endl
+ os << "--man-suffix <suffix> Use <suffix> instead of the default .1 to" << ::std::endl
<< " construct the name of the generated man page file." << ::std::endl;
- os << "--html-suffix <suffix> Use <suffix> instead of the default '.html' to" << ::std::endl
+ os << "--html-suffix <suffix> Use <suffix> instead of the default .html to" << ::std::endl
<< " construct the name of the generated HTML file." << ::std::endl;
- os << "--txt-suffix <suffix> Use <suffix> instead of the default '.txt' to" << ::std::endl
+ os << "--txt-suffix <suffix> Use <suffix> instead of the default .txt to" << ::std::endl
<< " construct the name of the generated text file." << ::std::endl;
os << "--option-prefix <prefix> Use <prefix> instead of the default '-' as an" << ::std::endl
@@ -1518,9 +1518,9 @@ print_usage (::std::ostream& os, ::cli::usage_para p)
<< " optional separator between options and arguments." << ::std::endl;
os << "--include-with-brackets Use angle brackets (<>) instead of quotes (\"\") in" << ::std::endl
- << " the generated '#include' directives." << ::std::endl;
+ << " the generated #include directives." << ::std::endl;
- os << "--include-prefix <prefix> Add <prefix> to the generated '#include' directive" << ::std::endl
+ os << "--include-prefix <prefix> Add <prefix> to the generated #include directive" << ::std::endl
<< " paths." << ::std::endl;
os << "--guard-prefix <prefix> Add <prefix> to the generated header inclusion" << ::std::endl