From 83b746df0e934a590cd4f6ff560563368c9a2e1d Mon Sep 17 00:00:00 2001 From: Vantz Stockwell Date: Wed, 25 Mar 2026 01:42:56 -0400 Subject: [PATCH] =?UTF-8?q?fix:=20OSC=207=20hook=20quoting=20=E2=80=94=20r?= =?UTF-8?q?emove=20extra=20escaped=20quotes=20around=20pwd?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- src-tauri/src/ssh/session.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src-tauri/src/ssh/session.rs b/src-tauri/src/ssh/session.rs index be45a28..3af25f1 100644 --- a/src-tauri/src/ssh/session.rs +++ b/src-tauri/src/ssh/session.rs @@ -165,9 +165,9 @@ impl SshService { { let osc7_hook = concat!( " stty -echo; ", - r#"__wraith_osc7() { printf '\e]7;file://localhost/%s\a' \"$(pwd | sed 's/ /%20/g')\"; }; "#, - r#"if [ -n "$ZSH_VERSION" ]; then precmd() { __wraith_osc7; }; "#, - r#"elif [ -n "$BASH_VERSION" ]; then PROMPT_COMMAND='__wraith_osc7'; fi; "#, + "__wraith_osc7() { printf '\\e]7;file://localhost/%s\\a' \"$(pwd | sed 's/ /%20/g')\"; }; ", + "if [ -n \"$ZSH_VERSION\" ]; then precmd() { __wraith_osc7; }; ", + "elif [ -n \"$BASH_VERSION\" ]; then PROMPT_COMMAND=__wraith_osc7; fi; ", "stty echo; clear; cd .\n" ); let h = handle.lock().await;