Skip to content

Commit

Permalink
terminal: Clear output after venv is activated (#22256)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
osiewicz and notpeter committed Dec 19, 2024
1 parent d60635b commit b9d1431
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions crates/project/src/terminals.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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>,
Expand Down

0 comments on commit b9d1431

Please sign in to comment.