summaryrefslogtreecommitdiff
path: root/src/shell-integration/elvish/lib
diff options
context:
space:
mode:
authorJon Parise <jon@indelible.org>2025-04-08 10:38:57 -0400
committerJon Parise <jon@indelible.org>2025-04-08 10:38:57 -0400
commitb213c157f079787e197bc3ad236db3616f4680fb (patch)
treeac72a974f3fb9c3c3d932b011adc6834897ef659 /src/shell-integration/elvish/lib
parent17ba0252e831457418da1b5c26ce16bdf83f0e5c (diff)
elvish: use kitty-shell-cwd:// to report pwd
OSC 7's standard body is a percent-encoded file:// URL. There isn't an easy way for us to percent-encode the path ($pwd) component here without implementing a custom function. Instead, switch to the kitty-shell-cwd:// scheme, which Kitty introduced to ease this implementation challenge in shell scripts. It accepts the path string verbatim, without an encoding. In Ghostty, we accept both the file:// and kitty-shell-cwd:// schemes, and we attempt to URI-decode them both, so in practice this is more about the "correctness" of this protocol than a functional change. It's also possible we might decide to treat these schemes differently in the runtime, like Kitty does.
Diffstat (limited to 'src/shell-integration/elvish/lib')
-rw-r--r--src/shell-integration/elvish/lib/ghostty-integration.elv2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shell-integration/elvish/lib/ghostty-integration.elv b/src/shell-integration/elvish/lib/ghostty-integration.elv
index bf6477aed..be98758c2 100644
--- a/src/shell-integration/elvish/lib/ghostty-integration.elv
+++ b/src/shell-integration/elvish/lib/ghostty-integration.elv
@@ -76,7 +76,7 @@
fn report-pwd {
use platform
- printf "\e]7;file://%s%s\a" platform:hostname $pwd
+ printf "\e]7;kitty-shell-cwd://%s%s\a" platform:hostname $pwd
}
fn sudo-with-terminfo {|@args|