fix: OSC 7 hook quoting — remove extra escaped quotes around pwd
All checks were successful
Build & Sign Wraith / Build Windows + Sign (push) Successful in 2m59s

The printf argument had escaped quotes that passed through literally,
producing paths like /"/Users/foo". Removed the outer escaped quotes
— printf %s handles the command substitution directly. Also simplified
PROMPT_COMMAND assignment to avoid quote nesting issues.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Vantz Stockwell 2026-03-25 01:42:56 -04:00
parent c1f8d2a14d
commit 83b746df0e

View File

@ -165,9 +165,9 @@ impl SshService {
{ {
let osc7_hook = concat!( let osc7_hook = concat!(
" stty -echo; ", " stty -echo; ",
r#"__wraith_osc7() { printf '\e]7;file://localhost/%s\a' \"$(pwd | sed 's/ /%20/g')\"; }; "#, "__wraith_osc7() { printf '\\e]7;file://localhost/%s\\a' \"$(pwd | sed 's/ /%20/g')\"; }; ",
r#"if [ -n "$ZSH_VERSION" ]; then precmd() { __wraith_osc7; }; "#, "if [ -n \"$ZSH_VERSION\" ]; then precmd() { __wraith_osc7; }; ",
r#"elif [ -n "$BASH_VERSION" ]; then PROMPT_COMMAND='__wraith_osc7'; fi; "#, "elif [ -n \"$BASH_VERSION\" ]; then PROMPT_COMMAND=__wraith_osc7; fi; ",
"stty echo; clear; cd .\n" "stty echo; clear; cd .\n"
); );
let h = handle.lock().await; let h = handle.lock().await;