Skip to content

Commit 4e9c8ed

Browse files
committed
shell: clear internal task output
1 parent c98f43d commit 4e9c8ed

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

devenv-shell/src/session.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,14 @@ impl ShellSession {
367367
task_runner.run_with_vt(&mut task_rx, &mut vt).await?;
368368
}
369369

370+
// Clear VT so internal task output (env exports, markers, drain
371+
// sentinels) is not rendered to the user. Send Ctrl-L so bash
372+
// redraws a clean prompt; the response will arrive via the
373+
// event loop.
374+
vt.feed_str("\x1b[2J\x1b[H");
375+
let _ = pty.write_all(&[0x0C]);
376+
let _ = pty.flush();
377+
370378
// Signal TUI that initial build is complete and we're ready for terminal
371379
tracing::trace!("session: sending backend_done_tx");
372380
let _ = handoff.backend_done_tx.send(());

0 commit comments

Comments
 (0)