From a1bb607c7e59d2d2acc18e29aa489c054ddff0b3 Mon Sep 17 00:00:00 2001 From: blinry Date: Thu, 7 Sep 2023 18:22:13 +0200 Subject: [PATCH] Make web-shell work when changing directories --- web/web-shell/script.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/web-shell/script.js b/web/web-shell/script.js index c9a67d5..1257e3c 100644 --- a/web/web-shell/script.js +++ b/web/web-shell/script.js @@ -56,7 +56,7 @@ function run(cmd) { if (output.endsWith("# ")) { emulator.remove_listener("serial0-output-char", listener) - let outputWithoutPrompt = output.slice(0, -4) + let outputWithoutPrompt = output.slice(0, -3) let outputWithoutFirstLine = outputWithoutPrompt.slice( outputWithoutPrompt.indexOf("\n") + 1 ) @@ -114,6 +114,7 @@ function boot() { // Wait for the emulator to start, then resolve the promise. var interval = setInterval(() => { if (emulator.is_running()) { + run("PS1='# '") clearInterval(interval) resolve(true) }