diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2021-01-25 19:03:13 +0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2021-01-25 19:03:13 +0100 |
commit | 36c4d6f59247826dde32ad2e6b5a9471a9a1c911 (patch) | |
tree | c07928e4554aaf6622cd1df996fd4fdc1c368f20 /src/libmain/common-args.cc | |
parent | 807d963ee8d23e88f09e28365b045d322530c5aa (diff) |
Group common options
Diffstat (limited to 'src/libmain/common-args.cc')
-rw-r--r-- | src/libmain/common-args.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libmain/common-args.cc b/src/libmain/common-args.cc index bd5573e5d..ff96ee7d5 100644 --- a/src/libmain/common-args.cc +++ b/src/libmain/common-args.cc @@ -11,18 +11,21 @@ MixCommonArgs::MixCommonArgs(const string & programName) .longName = "verbose", .shortName = 'v', .description = "Increase the logging verbosity level.", + .category = loggingCategory, .handler = {[]() { verbosity = (Verbosity) (verbosity + 1); }}, }); addFlag({ .longName = "quiet", .description = "Decrease the logging verbosity level.", + .category = loggingCategory, .handler = {[]() { verbosity = verbosity > lvlError ? (Verbosity) (verbosity - 1) : lvlError; }}, }); addFlag({ .longName = "debug", .description = "Set the logging verbosity level to 'debug'.", + .category = loggingCategory, .handler = {[]() { verbosity = lvlDebug; }}, }); @@ -52,6 +55,7 @@ MixCommonArgs::MixCommonArgs(const string & programName) addFlag({ .longName = "log-format", .description = "Set the format of log output; one of `raw`, `internal-json`, `bar` or `bar-with-logs`.", + .category = loggingCategory, .labels = {"format"}, .handler = {[](std::string format) { setLogFormat(format); }}, }); @@ -66,7 +70,7 @@ MixCommonArgs::MixCommonArgs(const string & programName) }} }); - std::string cat = "config"; + std::string cat = "Options to override configuration settings"; globalConfig.convertToArgs(*this, cat); // Backward compatibility hack: nix-env already had a --system flag. |