From 4b33c2dd4cac95151ca5d99ceb3161fdb460ec0a Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 9 Sep 2013 13:22:33 +0200 Subject: [PATCH] Add help (:?) --- nix-repl.cc | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/nix-repl.cc b/nix-repl.cc index 9c22abbfa..72099f46e 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" + << " Evaluate and print expression\n" + << " :a Add attributes from resulting set to scope\n" + << " :b Build derivation\n" + << " :l Load Nix expression and add it to scope\n" + << " :p Evaluate and print expression recursively\n" + << " :s Build dependencies of derivation, then start nix-shell\n" + << " :t Describe result of evaluation\n"; + } + + else if (command == ":a") { Value v; evalString(string(line, 2), v); addAttrsToScope(v);