diff options
author | eldritch horrors <pennae@lix.systems> | 2024-03-04 08:52:57 +0100 |
---|---|---|
committer | eldritch horrors <pennae@lix.systems> | 2024-03-04 08:52:57 +0100 |
commit | 43cedec6c535971d6c1cc86b009187ff742d505f (patch) | |
tree | 424e3a15255ae868be8afbb0f25a042633a92d80 /src/libcmd | |
parent | 9ef32cf3b8e645c9ed1e08b097d07db688cfb0a7 (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.cc | 13 |
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(); |