about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--nix-repl.cc14
1 files changed, 13 insertions, 1 deletions
diff --git a/nix-repl.cc b/nix-repl.cc
index 9c22abbfacf6..72099f46e622 100644
--- a/nix-repl.cc
+++ b/nix-repl.cc
@@ -248,7 +248,19 @@ void NixRepl::processLine(string line)
 
     string command = string(line, 0, 2);
 
-    if (command == ":a") {
+    if (command == ":?") {
+        cout << "The following commands are available:\n"
+             << "\n"
+             << "  <expr>     Evaluate and print expression\n"
+             << "  :a <expr>  Add attributes from resulting set to scope\n"
+             << "  :b <expr>  Build derivation\n"
+             << "  :l <path>  Load Nix expression and add it to scope\n"
+             << "  :p <expr>  Evaluate and print expression recursively\n"
+             << "  :s <expr>  Build dependencies of derivation, then start nix-shell\n"
+             << "  :t <expr>  Describe result of evaluation\n";
+    }
+
+    else if (command == ":a") {
         Value v;
         evalString(string(line, 2), v);
         addAttrsToScope(v);