Skip to content

Commit 9b3da73

Browse files
committed
Increase help space for option names
to accommodate the new option --enable-network-proxy
1 parent e76e4ae commit 9b3da73

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

source/libflags/source/Flags.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,11 @@ namespace {
110110
// print flag name
111111
os << flag_name;
112112
// decide if the help text goes into the same line or not
113-
if (flag_size > 22) {
113+
if (flag_size > 25) {
114114
os << std::endl
115115
<< std::string(15, ' ');
116116
} else {
117-
os << std::string(23 - flag_size, ' ');
117+
os << std::string(26 - flag_size, ' ');
118118
}
119119
os << option.help;
120120
// print default value if exists

source/libflags/test/FlagsTest.cc

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -177,16 +177,16 @@ namespace {
177177
const char *expected =
178178
"Usage: test [--flag] [--option <arg>] [--options <arg0> <arg1> <arg2>] [--verbose] [-- ...]\n"
179179
"\n"
180-
" --flag a single flag\n"
181-
" --option <arg> a flag with a value\n"
180+
" --flag a single flag\n"
181+
" --option <arg> a flag with a value\n"
182182
" --options <arg0> <arg1> <arg2>\n"
183183
" a flag with 3 values\n"
184-
" --verbose run in verbose mode\n"
185-
" -- ... rest of the arguments\n"
184+
" --verbose run in verbose mode\n"
185+
" -- ... rest of the arguments\n"
186186
"\n"
187187
"query options\n"
188-
" --help print help and exit\n"
189-
" --version print version and exit\n";
188+
" --help print help and exit\n"
189+
" --version print version and exit\n";
190190

191191
std::ostringstream out;
192192
sut.print_help(nullptr, out);
@@ -367,8 +367,8 @@ namespace {
367367
" dump\n"
368368
"\n"
369369
"query options\n"
370-
" --help print help and exit\n"
371-
" --version print version and exit\n";
370+
" --help print help and exit\n"
371+
" --version print version and exit\n";
372372

373373
std::ostringstream out;
374374
sut.print_help(nullptr, out);
@@ -378,11 +378,11 @@ namespace {
378378
const char *expected =
379379
"Usage: test append [--option <arg>] [--verbose]\n"
380380
"\n"
381-
" --option <arg> a flag with a value\n"
382-
" --verbose run in verbose mode\n"
381+
" --option <arg> a flag with a value\n"
382+
" --verbose run in verbose mode\n"
383383
"\n"
384384
"query options\n"
385-
" --help print help and exit\n";
385+
" --help print help and exit\n";
386386

387387
std::ostringstream out;
388388
sut.print_help(&append, out);

0 commit comments

Comments
 (0)