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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user