aboutsummaryrefslogtreecommitdiff
path: root/src/nix/repl.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-12-09 13:07:01 +0100
committerEelco Dolstra <edolstra@gmail.com>2020-12-21 13:32:28 +0100
commit6ce393392b4e303f51a512d64627cbd68a73c0e7 (patch)
tree1dc4da0b610cf3fb6cf1940a2450ce4b72a74a6b /src/nix/repl.cc
parentb2262be19babc37a54bed4384fecba11d87f7364 (diff)
Add 'nix repl' manpage
Diffstat (limited to 'src/nix/repl.cc')
-rw-r--r--src/nix/repl.cc12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/nix/repl.cc b/src/nix/repl.cc
index a992d8732..bce8d31dc 100644
--- a/src/nix/repl.cc
+++ b/src/nix/repl.cc
@@ -405,6 +405,7 @@ bool NixRepl::processLine(string line)
}
if (command == ":?" || command == ":help") {
+ // FIXME: convert to Markdown, include in the 'nix repl' manpage.
std::cout
<< "The following commands are available:\n"
<< "\n"
@@ -801,14 +802,11 @@ struct CmdRepl : StoreCommand, MixEvalArgs
return "start an interactive environment for evaluating Nix expressions";
}
- Examples examples() override
+ std::string doc() override
{
- return {
- Example{
- "Display all special commands within the REPL:",
- "nix repl\nnix-repl> :?"
- }
- };
+ return
+ #include "repl.md"
+ ;
}
void run(ref<Store> store) override