From a8b13ce6204a2cdbd398b94c2ea7ae911a93f0ec Mon Sep 17 00:00:00 2001 From: Philipp Jungkamp Date: Tue, 10 Mar 2026 22:29:13 +0100 Subject: [PATCH] feat(shell): Support OSC 9;4 progress on ptyxis --- src/cargo/core/shell.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/cargo/core/shell.rs b/src/cargo/core/shell.rs index 4adb5894865..442b1ec4152 100644 --- a/src/cargo/core/shell.rs +++ b/src/cargo/core/shell.rs @@ -646,8 +646,14 @@ fn supports_term_integration(stream: &dyn IsTerminal) -> bool { && std::env::var("TERM_FEATURES") .ok() .is_some_and(|v| term_features_has_progress(&v)); - - (windows_terminal || conemu || wezterm || ghostty || iterm) && stream.is_terminal() + // Ptyxis added OSC 9;4 support in 48.0. + // See https://gitlab.gnome.org/chergert/ptyxis/-/issues/305 + let ptyxis = std::env::var("PTYXIS_VERSION") + .ok() + .and_then(|version| version.split(".").next()?.parse::().ok()) + .is_some_and(|major_version| major_version >= 48); + + (windows_terminal || conemu || wezterm || ghostty || iterm || ptyxis) && stream.is_terminal() } // For iTerm, the TERM_FEATURES value "P" indicates OSC 9;4 support.