aboutsummaryrefslogtreecommitdiff
path: root/src/libcmd
diff options
context:
space:
mode:
authorBen Burdette <bburdette@protonmail.com>2022-03-31 09:37:36 -0600
committerBen Burdette <bburdette@protonmail.com>2022-03-31 09:37:36 -0600
commit1096d17b65834a7e1ff29d1afdf09536cc9d7a8d (patch)
tree58c96faecc710b8342d81fbe14073c4a09922f66 /src/libcmd
parentc0a567e1963faaf9b16f772d6b4e76496a88ed32 (diff)
show 'with' bindings as well as static
Diffstat (limited to 'src/libcmd')
-rw-r--r--src/libcmd/repl.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libcmd/repl.cc b/src/libcmd/repl.cc
index 2e3a3b6df..5de4cdf76 100644
--- a/src/libcmd/repl.cc
+++ b/src/libcmd/repl.cc
@@ -511,7 +511,7 @@ bool NixRepl::processLine(string line)
++iter, ++idx) {
if (idx == this->debugTraceIndex)
{
- printStaticEnvBindings(iter->expr);
+ printEnvBindings(iter->expr, iter->env);
break;
}
}
@@ -533,7 +533,7 @@ bool NixRepl::processLine(string line)
{
std::cout << "\n" << ANSI_BLUE << idx << ANSI_NORMAL << ": ";
showDebugTrace(std::cout, *iter);
- printStaticEnvBindings(iter->expr);
+ printEnvBindings(iter->expr, iter->env);
loadDebugTraceEnv(*iter);
break;
}
@@ -1010,14 +1010,14 @@ void runRepl(
repl->initEnv();
// add 'extra' vars.
- std::set<std::string> names;
+ // std::set<std::string> names;
for (auto & [name, value] : extraEnv) {
// names.insert(ANSI_BOLD + name + ANSI_NORMAL);
- names.insert(name);
+ // names.insert(name);
repl->addVarToScope(repl->state->symbols.create(name), *value);
}
- printError(hintfmt("The following extra variables are in scope: %s\n", concatStringsSep(", ", names)).str());
+ // printError(hintfmt("The following extra variables are in scope: %s\n", concatStringsSep(", ", names)).str());
repl->mainLoop({});
}