diff --git a/src/libcmd/repl.cc b/src/libcmd/repl.cc index df8932087..bb254ff8d 100644 --- a/src/libcmd/repl.cc +++ b/src/libcmd/repl.cc @@ -384,6 +384,10 @@ StringSet NixRepl::completePrefix(const std::string & prefix) i++; } } else { + /* Temporarily disable the debugger, to avoid re-entering readline. */ + auto debug_repl = state->debugRepl; + state->debugRepl = nullptr; + Finally restoreDebug([&]() { state->debugRepl = debug_repl; }); try { /* This is an expression that should evaluate to an attribute set. Evaluate it to get the names of the