1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-29 19:03:16 +02:00

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
This commit is contained in:
allrealmsoflife 2025-04-01 10:23:58 +02:00
parent 6fe39566d2
commit d3ebbb37e8

View file

@ -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);
}