From b9d1431e17eaa22975c7c9b5f230297620f39d0a Mon Sep 17 00:00:00 2001 From: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> Date: Thu, 19 Dec 2024 18:43:19 +0100 Subject: [PATCH] terminal: Clear output after venv is activated (#22256) The command used to activate the venv can still be accessed/scrolled to if needed. Release Notes: - The Python virtual environment activation command is no longer shown in the terminal output by default. Co-authored-by: Peter Tripp --- crates/project/src/terminals.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/crates/project/src/terminals.rs b/crates/project/src/terminals.rs index 779bc2c4a046806fb36ace8ee283bbe4714fca9f..16917baac49c744fff16d3c2fa2e90ce952597ab 100644 --- a/crates/project/src/terminals.rs +++ b/crates/project/src/terminals.rs @@ -433,7 +433,10 @@ impl Project { "windows" => "\r", _ => "\n", }; - Some(format!("{} {}{}", activate_keyword, quoted, line_ending)) + Some(format!( + "{} {} ; clear{}", + activate_keyword, quoted, line_ending + )) } fn activate_python_virtual_environment( @@ -450,7 +453,7 @@ impl Project { } } -pub fn wrap_for_ssh( +fn wrap_for_ssh( ssh_command: &SshCommand, command: Option<(&String, &Vec)>, path: Option<&Path>,