diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-09-09T11·22+0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-09-09T11·22+0200 |
commit | 4b33c2dd4cac95151ca5d99ceb3161fdb460ec0a (patch) | |
tree | 531c88b300328c5d0dd88b02c05c9acac151417b | |
parent | e133e91410d9486e022a1bc0372b822152b6654e (diff) |
Add help (:?)
-rw-r--r-- | nix-repl.cc | 14 |
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); |