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 <peter@zed.dev>
This commit is contained in:
Piotr Osiewicz 2024-12-19 18:43:19 +01:00 committed by GitHub
parent 1071814d41
commit 8e81070091
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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<String>)>,
path: Option<&Path>,