Add 'nix help' manpage

This commit is contained in:
Eelco Dolstra 2020-12-10 18:40:16 +01:00
parent e6bea9c9b1
commit daf365b0b7
No known key found for this signature in database
GPG Key ID: 8170B4726D7198DE
2 changed files with 22 additions and 12 deletions

17
src/nix/help.md Normal file
View File

@ -0,0 +1,17 @@
R""(
# Examples
* Show help about `nix` in general:
```console
# nix help
```
* Show help about a particular subcommand:
```console
# nix help flake info
```
)""

View File

@ -205,21 +205,14 @@ struct CmdHelp : Command
std::string description() override
{
return "show help about 'nix' or a particular subcommand";
return "show help about `nix` or a particular subcommand";
}
Examples examples() override
std::string doc() override
{
return {
Example{
"To show help about 'nix' in general:",
"nix help"
},
Example{
"To show help about a particular subcommand:",
"nix help run"
},
};
return
#include "help.md"
;
}
void run() override