about summary refs log tree commit diff
path: root/src/libmain
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-06-07T16·41+0200
committerEelco Dolstra <edolstra@gmail.com>2017-06-07T16·41+0200
commit186571965dccf57d15b9f37c1cca92a57187b7b3 (patch)
tree79c38bc54d9a3e2bbd296a094ca988c13088fb09 /src/libmain
parentaa952d5f0bc623a1584f2d589209f586e594c75f (diff)
Don't show flags from config settings in "nix --help"
Diffstat (limited to 'src/libmain')
-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 9a7a893138de..3fa42c2aafa9 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 {