aboutsummaryrefslogtreecommitdiff
path: root/src/libcmd
diff options
context:
space:
mode:
authoreldritch horrors <pennae@lix.systems>2024-03-04 08:52:57 +0100
committereldritch horrors <pennae@lix.systems>2024-03-04 08:52:57 +0100
commit43cedec6c535971d6c1cc86b009187ff742d505f (patch)
tree424e3a15255ae868be8afbb0f25a042633a92d80 /src/libcmd
parent9ef32cf3b8e645c9ed1e08b097d07db688cfb0a7 (diff)
Merge pull request #9919 from 9999years/reduce-debugger-clutter
Reduce visual clutter in the debugger (cherry picked from commit f388a6148dae0fc999f1a67d0b96d76788f9b97f) Change-Id: I21bfe3e9f75816484b0f46dbe09e0ff40b22c6d9
Diffstat (limited to 'src/libcmd')
-rw-r--r--src/libcmd/repl.cc13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/libcmd/repl.cc b/src/libcmd/repl.cc
index f5abaad9b..bcd887d76 100644
--- a/src/libcmd/repl.cc
+++ b/src/libcmd/repl.cc
@@ -232,10 +232,19 @@ static std::ostream & showDebugTrace(std::ostream & out, const PosTable & positi
return out;
}
+static bool isFirstRepl = true;
+
void NixRepl::mainLoop()
{
- std::string error = ANSI_RED "error:" ANSI_NORMAL " ";
- notice("Welcome to Nix " + nixVersion + ". Type :? for help.\n");
+ if (isFirstRepl) {
+ std::string_view debuggerNotice = "";
+ if (state->debugRepl) {
+ debuggerNotice = " debugger";
+ }
+ notice("Nix %1%%2%\nType :? for help.", nixVersion, debuggerNotice);
+ }
+
+ isFirstRepl = false;
loadFiles();