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 <[email protected]>
Цей коміт міститься в:
Ray Liangтаcubelitblade authored and GitHub committed 2026-11-18 08:37:55 +08:00
1 джерело c1782f01eb
коміт c1f3debbb9
1 file changed
+1 -1
+1 -1
Переглянути файл
@@ -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"#,
);