From c1f3debbb9d15f3e2acb6ce539263f310f4e7596 Mon Sep 17 00:00:00 2001 From: Ray Liang Date: Wed, 18 Nov 2026 08:37:55 +0800 Subject: [PATCH] fix(terminal): use fish's hostname variable for OSC 7 (#4050) The fish prompt hook ran the external hostname command to build the OSC 7 working-directory URL, so fish printed an error at every prompt where that command is unavailable. It now uses fish's built-in \$hostname variable. Closes #4046 Co-authored-by: cubelitblade <135247075+cubelitblade@users.noreply.github.com> --- crates/ide-terminal/src/integration.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/ide-terminal/src/integration.rs b/crates/ide-terminal/src/integration.rs index eea63e7a7..0448b06c5 100644 --- a/crates/ide-terminal/src/integration.rs +++ b/crates/ide-terminal/src/integration.rs @@ -83,7 +83,7 @@ esac "#; const FISH_INIT: &str = concat!( - r#"function __openidea_osc7 --on-event fish_prompt; printf '\e]133;D;%s\a\e]7;file://%s%s\a' "$status" (hostname) $PWD; end; "#, + r#"function __openidea_osc7 --on-event fish_prompt; printf '\e]133;D;%s\a\e]7;file://%s%s\a' "$status" "$hostname" $PWD; end; "#, r#"function __openidea_preexec --on-event fish_preexec; printf '\e]133;C\a'; end"#, );