Add support for xonsh shell (#39834)

Closes #39506

Release Notes:

- Fixed environment variable capture when login shell is
[xonsh](https://xon.sh/)

---------

Co-authored-by: Jakub Konka <kubkon@jakubkonka.com>
This commit is contained in:
Merlin04
2025-10-09 12:00:22 +02:00
committed by GitHub
co-authored by Jakub Konka
parent 1bb6752e3e
commit 37d676e2c6
4 changed files with 24 additions and 4 deletions
+4 -2
View File
@@ -56,7 +56,8 @@ impl ShellBuilder {
| ShellKind::Fish
| ShellKind::Csh
| ShellKind::Tcsh
| ShellKind::Rc => {
| ShellKind::Rc
| ShellKind::Xonsh => {
let interactivity = self.interactive.then_some("-i ").unwrap_or_default();
format!(
"{PROGRAM} {interactivity}-c '{command_to_use_in_label}'",
@@ -91,7 +92,8 @@ impl ShellBuilder {
| ShellKind::Fish
| ShellKind::Csh
| ShellKind::Tcsh
| ShellKind::Rc => {
| ShellKind::Rc
| ShellKind::Xonsh => {
combined_command.insert(0, '(');
combined_command.push_str(") </dev/null");
}