updatePrompt method
Replaces the prompt, redrawing the line being typed.
Implementation
void updatePrompt(String prompt) {
if (prompt == _prompt) return;
_prompt = prompt;
if (_reading == null || !_interactive) return;
if (_ansi) {
_refresh();
} else {
_output.write('\n${_stripAnsi(prompt)}${String.fromCharCodes(_line)}');
}
}