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.pull/7033/head
parent
17ba0252e8
commit
b213c157f0
|
|
@ -76,7 +76,7 @@
|
||||||
|
|
||||||
fn report-pwd {
|
fn report-pwd {
|
||||||
use platform
|
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|
|
fn sudo-with-terminfo {|@args|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue