diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2020-10-29 18:26:35 +0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2020-10-29 18:26:35 +0100 |
commit | 7f56cf67bac3731ed8e217170eb548bf0fd2cfcb (patch) | |
tree | 5536d2585df3fe88c999290f9d84070b21b05d0f /src/libutil | |
parent | ff4dea63c9403880500f82ce273713ecf793d2d9 (diff) |
Fix assertion failure in tab completion for --option
Diffstat (limited to 'src/libutil')
-rw-r--r-- | src/libutil/config.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libutil/config.cc b/src/libutil/config.cc index 116dd6bfe..be957dfe3 100644 --- a/src/libutil/config.cc +++ b/src/libutil/config.cc @@ -200,7 +200,7 @@ void BaseSetting<T>::convertToArg(Args & args, const std::string & category) { args.addFlag({ .longName = name, - .description = description, + .description = fmt("Set the `%s` setting.", name), .category = category, .labels = {"value"}, .handler = {[=](std::string s) { overriden = true; set(s); }}, @@ -209,7 +209,7 @@ void BaseSetting<T>::convertToArg(Args & args, const std::string & category) if (isAppendable()) args.addFlag({ .longName = "extra-" + name, - .description = description, + .description = fmt("Append to the `%s` setting.", name), .category = category, .labels = {"value"}, .handler = {[=](std::string s) { overriden = true; set(s, true); }}, @@ -260,13 +260,13 @@ template<> void BaseSetting<bool>::convertToArg(Args & args, const std::string & { args.addFlag({ .longName = name, - .description = description, + .description = fmt("Enable the `%s` setting.", name), .category = category, .handler = {[=]() { override(true); }} }); args.addFlag({ .longName = "no-" + name, - .description = description, + .description = fmt("Disable the `%s` setting.", name), .category = category, .handler = {[=]() { override(false); }} }); |