From c967c29290b1d0b7ea5a169c39324ddca46403ba Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 21 Mar 2023 14:43:58 +0100 Subject: Add a "help" category This makes the help commands show up prominently at the top of the 'nix' manpage. --- src/nix/main.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/nix/main.cc') diff --git a/src/nix/main.cc b/src/nix/main.cc index 5981028f7..ffe558ee8 100644 --- a/src/nix/main.cc +++ b/src/nix/main.cc @@ -65,6 +65,7 @@ struct NixArgs : virtual MultiCommand, virtual MixCommonArgs NixArgs() : MultiCommand(RegisterCommand::getCommandsFor({})), MixCommonArgs("nix") { categories.clear(); + categories[catHelp] = "Help commands"; categories[Command::catDefault] = "Main commands"; categories[catSecondary] = "Infrequently used commands"; categories[catUtility] = "Utility/scripting commands"; @@ -255,6 +256,8 @@ struct CmdHelp : Command ; } + Category category() override { return catHelp; } + void run() override { assert(parent); @@ -280,6 +283,8 @@ struct CmdHelpStores : Command ; } + Category category() override { return catHelp; } + void run() override { showHelp({"help-stores"}, getNixArgs(*this)); -- cgit v1.2.3