about summary refs log tree commit diff
path: root/nix-repl.cc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2016-02-29T11·48+0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2016-02-29T11·48+0100
commit79b02dffcb6f79bb200d17749265cec23c6dda77 (patch)
tree32f588ee9228f5cac53ddc8b7e74b5d771dac0b1 /nix-repl.cc
parent2bfb00c66e6f13f87bcc926fe5e7290c21856090 (diff)
parent287dfee35edc6c324ee8829f37a8ed6b07c35ffa (diff)
Merge pull request #20 from tsion/more-help
Expand the help message printed from --help.
Diffstat (limited to 'nix-repl.cc')
-rw-r--r--nix-repl.cc31
1 files changed, 29 insertions, 2 deletions
diff --git a/nix-repl.cc b/nix-repl.cc
index 1bfb1a7b51e1..8c4f4017470d 100644
--- a/nix-repl.cc
+++ b/nix-repl.cc
@@ -56,8 +56,35 @@ struct NixRepl
 
 void printHelp()
 {
-    std::cout << "Usage: nix-repl [--help|--version]";
-    std::cout << std::endl;
+    cout << "Usage: nix-repl [--help] [--version] [-I path] paths...\n"
+         << "\n"
+         << "nix-repl is a simple read-eval-print loop (REPL) for the Nix package manager.\n"
+         << "\n"
+         << "Options:\n"
+         << "    --help\n"
+         << "        Prints out a summary of the command syntax and exits.\n"
+         << "\n"
+         << "    --version\n"
+         << "        Prints out the Nix version number on standard output and exits.\n"
+         << "\n"
+         << "    -I path\n"
+         << "        Add a path to the Nix expression search path. This option may be given\n"
+         << "        multiple times. See the NIX_PATH environment variable for information on\n"
+         << "        the semantics of the Nix search path. Paths added through -I take\n"
+         << "        precedence over NIX_PATH.\n"
+         << "\n"
+         << "    paths...\n"
+         << "        A list of paths to files containing Nix expressions which nix-repl will\n"
+         << "        load and add to its scope.\n"
+         << "\n"
+         << "        A path surrounded in < and > will be looked up in the Nix expression search\n"
+         << "        path, as in the Nix language itself.\n"
+         << "\n"
+         << "        If an element of paths starts with http:// or https://, it is interpreted\n"
+         << "        as the URL of a tarball that will be downloaded and unpacked to a temporary\n"
+         << "        location. The tarball must include a single top-level directory containing\n"
+         << "        at least a file named default.nix.\n"
+         << flush;
 }