acp_thread: Respect terminal settings shell for terminal tool environment (#39349)

When sourcing the project environment for the terminal tool, we will now
do so by spawning the shell specified by the users `terminal.shell`
setting (or as usual fall back to the login shell).

Closes #37687 

Release Notes:

- N/A
This commit is contained in:
Lukas Wirth
2025-10-02 22:10:55 +02:00
committed by GitHub
parent 7c3a21f732
commit bf48a95344
13 changed files with 615 additions and 499 deletions
+6 -2
View File
@@ -1187,11 +1187,13 @@ impl ToolchainLister for PythonToolchainProvider {
ShellKind::PowerShell => ".",
ShellKind::Fish => "source",
ShellKind::Csh => "source",
ShellKind::Posix => "source",
ShellKind::Tcsh => "source",
ShellKind::Posix | ShellKind::Rc => "source",
};
let activate_script_name = match shell {
ShellKind::Posix => "activate",
ShellKind::Posix | ShellKind::Rc => "activate",
ShellKind::Csh => "activate.csh",
ShellKind::Tcsh => "activate.csh",
ShellKind::Fish => "activate.fish",
ShellKind::Nushell => "activate.nu",
ShellKind::PowerShell => "activate.ps1",
@@ -1220,7 +1222,9 @@ impl ToolchainLister for PythonToolchainProvider {
ShellKind::Nushell => Some(format!("\"{pyenv}\" shell - nu {version}")),
ShellKind::PowerShell => None,
ShellKind::Csh => None,
ShellKind::Tcsh => None,
ShellKind::Cmd => None,
ShellKind::Rc => None,
})
}
_ => {}