diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2020-08-20 12:21:46 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2020-08-20 12:21:46 +0200 |
commit | dc2f278c95ce4a73749cbb8221a568201535d46a (patch) | |
tree | 9e4a754396d63b731ed7e5ccfb7e572547d06e1a /src/nix | |
parent | 3c4f8c91759ac5ed6a211f8e72b9d4e8438db833 (diff) |
Allow 'nix' subcommands to provide docs in Markdown format
Diffstat (limited to 'src/nix')
-rw-r--r-- | src/nix/add-to-store.cc | 8 | ||||
-rw-r--r-- | src/nix/repl.cc | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/nix/add-to-store.cc b/src/nix/add-to-store.cc index 713155840..023ffa4ed 100644 --- a/src/nix/add-to-store.cc +++ b/src/nix/add-to-store.cc @@ -36,6 +36,14 @@ struct CmdAddToStore : MixDryRun, StoreCommand return "add a path to the Nix store"; } + std::string doc() override + { + return R"( + Copy the file or directory *path* to the Nix store, and + print the resulting store path on standard output. + )"; + } + Examples examples() override { return { diff --git a/src/nix/repl.cc b/src/nix/repl.cc index a74655200..0cbe9643c 100644 --- a/src/nix/repl.cc +++ b/src/nix/repl.cc @@ -782,7 +782,7 @@ struct CmdRepl : StoreCommand, MixEvalArgs return { Example{ "Display all special commands within the REPL:", - "nix repl\n nix-repl> :?" + "nix repl\nnix-repl> :?" } }; } |