From d3ebbb37e8fc0c0d5e73cae0f94d5d026e7f63c5 Mon Sep 17 00:00:00 2001 From: allrealmsoflife Date: Tue, 1 Apr 2025 10:23:58 +0200 Subject: [PATCH] repl: improve continuation prompt for incomplete expressions Previously, when users entered an incomplete expression in the REPL, the continuation prompt was just 10 blank spaces, which looked invisible and gave the impression that the REPL had stalled. This change updates the prompt to " > ", aligning it visually with 'nix-repl> ' and clearly indicating that the REPL is waiting for more input. Fixes: https://github.com/NixOS/nix/issues/12702 --- src/libcmd/repl-interacter.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcmd/repl-interacter.cc b/src/libcmd/repl-interacter.cc index 773e111b2..ea06b231f 100644 --- a/src/libcmd/repl-interacter.cc +++ b/src/libcmd/repl-interacter.cc @@ -135,7 +135,7 @@ static constexpr const char * promptForType(ReplPromptType promptType) case ReplPromptType::ReplPrompt: return "nix-repl> "; case ReplPromptType::ContinuationPrompt: - return " "; + return " > "; // 9 spaces + > } assert(false); }