aboutsummaryrefslogtreecommitdiff
path: root/src/libcmd/repl.cc
diff options
context:
space:
mode:
authorThéophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com>2023-09-14 16:43:02 +0200
committerGitHub <noreply@github.com>2023-09-14 16:43:02 +0200
commit2a52ec4e928c254338a612a6b40355512298ef38 (patch)
tree277e787d6d6c68ea6288031bdec469aaab2590db /src/libcmd/repl.cc
parentb99fdcf8dbb38ec0be0e82f65d1d138ec9e89dda (diff)
parent2265901e6e36b84276e71642c58c39f946badd08 (diff)
Merge pull request #7661 from henrik-ch/repl-doc
improved help command listing.
Diffstat (limited to 'src/libcmd/repl.cc')
-rw-r--r--src/libcmd/repl.cc53
1 files changed, 29 insertions, 24 deletions
diff --git a/src/libcmd/repl.cc b/src/libcmd/repl.cc
index ea7d0e2ec..944609f22 100644
--- a/src/libcmd/repl.cc
+++ b/src/libcmd/repl.cc
@@ -488,35 +488,40 @@ bool NixRepl::processLine(std::string line)
std::cout
<< "The following commands are available:\n"
<< "\n"
- << " <expr> Evaluate and print expression\n"
- << " <x> = <expr> Bind expression to variable\n"
- << " :a <expr> Add attributes from resulting set to scope\n"
- << " :b <expr> Build a derivation\n"
- << " :bl <expr> Build a derivation, creating GC roots in the working directory\n"
- << " :e <expr> Open package or function in $EDITOR\n"
- << " :i <expr> Build derivation, then install result into current profile\n"
- << " :l <path> Load Nix expression and add it to scope\n"
- << " :lf <ref> Load Nix flake and add it to scope\n"
- << " :p <expr> Evaluate and print expression recursively\n"
- << " :q Exit nix-repl\n"
- << " :r Reload all files\n"
- << " :sh <expr> Build dependencies of derivation, then start nix-shell\n"
- << " :t <expr> Describe result of evaluation\n"
- << " :u <expr> Build derivation, then start nix-shell\n"
- << " :doc <expr> Show documentation of a builtin function\n"
- << " :log <expr> Show logs for a derivation\n"
- << " :te [bool] Enable, disable or toggle showing traces for errors\n"
+ << " <expr> Evaluate and print expression\n"
+ << " <x> = <expr> Bind expression to variable\n"
+ << " :a, :add <expr> Add attributes from resulting set to scope\n"
+ << " :b <expr> Build a derivation\n"
+ << " :bl <expr> Build a derivation, creating GC roots in the\n"
+ << " working directory\n"
+ << " :e, :edit <expr> Open package or function in $EDITOR\n"
+ << " :i <expr> Build derivation, then install result into\n"
+ << " current profile\n"
+ << " :l, :load <path> Load Nix expression and add it to scope\n"
+ << " :lf, :load-flake <ref> Load Nix flake and add it to scope\n"
+ << " :p, :print <expr> Evaluate and print expression recursively\n"
+ << " :q, :quit Exit nix-repl\n"
+ << " :r, :reload Reload all files\n"
+ << " :sh <expr> Build dependencies of derivation, then start\n"
+ << " nix-shell\n"
+ << " :t <expr> Describe result of evaluation\n"
+ << " :u <expr> Build derivation, then start nix-shell\n"
+ << " :doc <expr> Show documentation of a builtin function\n"
+ << " :log <expr> Show logs for a derivation\n"
+ << " :te, :trace-enable [bool] Enable, disable or toggle showing traces for\n"
+ << " errors\n"
+ << " :?, :help Brings up this help menu\n"
;
if (state->debugRepl) {
std::cout
<< "\n"
<< " Debug mode commands\n"
- << " :env Show env stack\n"
- << " :bt Show trace stack\n"
- << " :st Show current trace\n"
- << " :st <idx> Change to another trace in the stack\n"
- << " :c Go until end of program, exception, or builtins.break\n"
- << " :s Go one step\n"
+ << " :env Show env stack\n"
+ << " :bt, :backtrace Show trace stack\n"
+ << " :st Show current trace\n"
+ << " :st <idx> Change to another trace in the stack\n"
+ << " :c, :continue Go until end of program, exception, or builtins.break\n"
+ << " :s, :step Go one step\n"
;
}