aboutsummaryrefslogtreecommitdiff
path: root/src/nix/main.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2021-10-06 13:01:18 +0200
committerEelco Dolstra <edolstra@gmail.com>2021-10-06 13:01:18 +0200
commit08aa7daee0b21049cd4aa75f2af14ddf46497cbd (patch)
treef63fffd52d4b6471fd8d98c448a11ffe908084bd /src/nix/main.cc
parentd12bf8eff0e8c8f4197671f67b5c8117108e3769 (diff)
Remove links to .md files in help output
Fixes #5337.
Diffstat (limited to 'src/nix/main.cc')
-rw-r--r--src/nix/main.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/nix/main.cc b/src/nix/main.cc
index 8aaf08813..2c3976689 100644
--- a/src/nix/main.cc
+++ b/src/nix/main.cc
@@ -187,11 +187,14 @@ static void showHelp(std::vector<std::string> subcommand, MultiCommand & topleve
, "/"),
*vUtils);
- auto vJson = state.allocValue();
+ auto vArgs = state.allocValue();
+ state.mkAttrs(*vArgs, 16);
+ auto vJson = state.allocAttr(*vArgs, state.symbols.create("command"));
mkString(*vJson, toplevel.toJSON().dump());
+ vArgs->attrs->sort();
auto vRes = state.allocValue();
- state.callFunction(*vGenerateManpage, *vJson, *vRes, noPos);
+ state.callFunction(*vGenerateManpage, *vArgs, *vRes, noPos);
auto attr = vRes->attrs->get(state.symbols.create(mdName + ".md"));
if (!attr)