fix: more portable OSC 7 hook — BEL terminator, %20 space encoding
Some checks failed
Build & Sign Wraith / Build Windows + Sign (push) Failing after 7s
Some checks failed
Build & Sign Wraith / Build Windows + Sign (push) Failing after 7s
Switched to printf '\e]7;file://localhost/%s\a' with sed space encoding. BEL (\a) terminator is more universally supported than ST (\e\\). Shared __wraith_osc7 function avoids duplicating the printf across bash/zsh branches. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
0251614732
commit
8565f11c11
@ -165,11 +165,9 @@ impl SshService {
|
|||||||
{
|
{
|
||||||
let osc7_hook = concat!(
|
let osc7_hook = concat!(
|
||||||
" stty -echo; ",
|
" stty -echo; ",
|
||||||
r#"if [ -n "$ZSH_VERSION" ]; then "#,
|
r#"__wraith_osc7() { printf '\e]7;file://localhost/%s\a' \"$(pwd | sed 's/ /%20/g')\"; }; "#,
|
||||||
r#"precmd() { printf '\033]7;file://%s%s\033\\' "$HOST" "$PWD"; }; "#,
|
r#"if [ -n "$ZSH_VERSION" ]; then precmd() { __wraith_osc7; }; "#,
|
||||||
r#"elif [ -n "$BASH_VERSION" ]; then "#,
|
r#"elif [ -n "$BASH_VERSION" ]; then PROMPT_COMMAND='__wraith_osc7'; fi; "#,
|
||||||
r#"PROMPT_COMMAND='printf "\033]7;file://%s%s\033\\\\" "$HOSTNAME" "$PWD"'; "#,
|
|
||||||
r#"fi; "#,
|
|
||||||
"stty echo; clear; cd .\n"
|
"stty echo; clear; cd .\n"
|
||||||
);
|
);
|
||||||
let h = handle.lock().await;
|
let h = handle.lock().await;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user