mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-17 04:52:47 +00:00
elvish: always report current directory changes (#10533)
This reporting shouldn't have been tied to the 'title' shell features. That's a different feature where we change the window title (icon) to reflect the current command using OSC 2.
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
}
|
||||
|
||||
{
|
||||
use platform
|
||||
use str
|
||||
|
||||
# List of enabled shell integration features
|
||||
@@ -77,11 +78,6 @@
|
||||
printf "\e]133;D;"$exit-status"\a"
|
||||
}
|
||||
|
||||
fn report-pwd {
|
||||
use platform
|
||||
printf "\e]7;kitty-shell-cwd://%s%s\a" (platform:hostname) $pwd
|
||||
}
|
||||
|
||||
fn sudo-with-terminfo {|@args|
|
||||
var sudoedit = $false
|
||||
for arg $args {
|
||||
@@ -180,16 +176,12 @@
|
||||
|
||||
defer {
|
||||
mark-prompt-start
|
||||
report-pwd
|
||||
}
|
||||
|
||||
set edit:before-readline = (conj $edit:before-readline $mark-prompt-start~)
|
||||
set edit:after-readline = (conj $edit:after-readline $mark-output-start~)
|
||||
set edit:after-command = (conj $edit:after-command $mark-output-end~)
|
||||
|
||||
if (has-value $features title) {
|
||||
set after-chdir = (conj $after-chdir {|_| report-pwd })
|
||||
}
|
||||
if (has-value $features cursor) {
|
||||
fn beam { printf "\e[5 q" }
|
||||
fn block { printf "\e[0 q" }
|
||||
@@ -207,4 +199,9 @@
|
||||
if (and (str:contains $E:GHOSTTY_SHELL_FEATURES ssh-) (has-external ssh)) {
|
||||
edit:add-var ssh~ $ssh-integration~
|
||||
}
|
||||
|
||||
# Report changes to the current directory.
|
||||
fn report-pwd { printf "\e]7;kitty-shell-cwd://%s%s\a" (platform:hostname) $pwd }
|
||||
set after-chdir = (conj $after-chdir {|_| report-pwd })
|
||||
report-pwd
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user