aboutsummaryrefslogtreecommitdiff
path: root/src/libmain/common-args.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-06-07 18:41:20 +0200
committerEelco Dolstra <edolstra@gmail.com>2017-06-07 18:41:20 +0200
commit186571965dccf57d15b9f37c1cca92a57187b7b3 (patch)
tree79c38bc54d9a3e2bbd296a094ca988c13088fb09 /src/libmain/common-args.cc
parentaa952d5f0bc623a1584f2d589209f586e594c75f (diff)
Don't show flags from config settings in "nix --help"
Diffstat (limited to 'src/libmain/common-args.cc')
-rw-r--r--src/libmain/common-args.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/libmain/common-args.cc b/src/libmain/common-args.cc
index 9a7a89313..3fa42c2aa 100644
--- a/src/libmain/common-args.cc
+++ b/src/libmain/common-args.cc
@@ -18,8 +18,12 @@ MixCommonArgs::MixCommonArgs(const string & programName)
verbosity = lvlDebug;
});
- mkFlag(0, "option", {"name", "value"}, "set a Nix configuration option (overriding nix.conf)", 2,
- [](Strings ss) {
+ mkFlag()
+ .longName("option")
+ .labels({"name", "value"})
+ .description("set a Nix configuration option (overriding nix.conf)")
+ .arity(2)
+ .handler([](Strings ss) {
auto name = ss.front(); ss.pop_front();
auto value = ss.front();
try {