Rename variable, add to example
This commit is contained in:
parent
43ce03fdbd
commit
aaa5e790b6
@ -1636,7 +1636,7 @@ namespace cxxopts
|
|||||||
const HelpOptionDetails& o,
|
const HelpOptionDetails& o,
|
||||||
size_t start,
|
size_t start,
|
||||||
size_t allowed,
|
size_t allowed,
|
||||||
bool m_tab_expansion
|
bool tab_expansion
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
auto desc = o.desc;
|
auto desc = o.desc;
|
||||||
@ -1655,7 +1655,7 @@ namespace cxxopts
|
|||||||
|
|
||||||
String result;
|
String result;
|
||||||
|
|
||||||
if (m_tab_expansion)
|
if (tab_expansion)
|
||||||
{
|
{
|
||||||
String desc2;
|
String desc2;
|
||||||
auto size = size_t{ 0 };
|
auto size = size_t{ 0 };
|
||||||
|
|||||||
@ -39,6 +39,8 @@ parse(int argc, const char* argv[])
|
|||||||
bool apple = false;
|
bool apple = false;
|
||||||
|
|
||||||
options
|
options
|
||||||
|
.set_width(70)
|
||||||
|
.set_tab_expansion()
|
||||||
.allow_unrecognised_options()
|
.allow_unrecognised_options()
|
||||||
.add_options()
|
.add_options()
|
||||||
("a,apple", "an apple", cxxopts::value<bool>(apple))
|
("a,apple", "an apple", cxxopts::value<bool>(apple))
|
||||||
@ -56,6 +58,7 @@ parse(int argc, const char* argv[])
|
|||||||
("long-description",
|
("long-description",
|
||||||
"thisisareallylongwordthattakesupthewholelineandcannotbebrokenataspace")
|
"thisisareallylongwordthattakesupthewholelineandcannotbebrokenataspace")
|
||||||
("help", "Print help")
|
("help", "Print help")
|
||||||
|
("tab-expansion", "Tab\texpansion")
|
||||||
("int", "An integer", cxxopts::value<int>(), "N")
|
("int", "An integer", cxxopts::value<int>(), "N")
|
||||||
("float", "A floating point number", cxxopts::value<float>())
|
("float", "A floating point number", cxxopts::value<float>())
|
||||||
("vector", "A list of doubles", cxxopts::value<std::vector<double>>())
|
("vector", "A list of doubles", cxxopts::value<std::vector<double>>())
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user