File tree Expand file tree Collapse file tree 4 files changed +10
-16
lines changed
pkg/util/shellutil/shellintegration Expand file tree Collapse file tree 4 files changed +10
-16
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ _waveterm_si_urlencode() {
7575_waveterm_si_osc7 () {
7676 _waveterm_si_blocked && return
7777 local encoded_pwd=$( _waveterm_si_urlencode " $PWD " )
78- printf ' \033]7;file://%s%s \007' " $HOSTNAME " " $encoded_pwd "
78+ printf ' \033]7;file://localhost%s \007' " $encoded_pwd "
7979}
8080
8181_waveterm_si_precmd () {
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ function _waveterm_si_osc7
2121 _waveterm_si_blocked; and return
2222 # Use fish-native URL encoding
2323 set -l encoded_pwd (string escape --style=url -- " $PWD " )
24- printf ' \033]7;file://%s%s \007' $hostname $encoded_pwd
24+ printf ' \033]7;file://localhost%s \007' $encoded_pwd
2525end
2626
2727function _waveterm_si_prompt --on-event fish_prompt
Original file line number Diff line number Diff line change @@ -27,17 +27,11 @@ function Global:_waveterm_si_blocked {
2727function Global:_waveterm_si_osc7 {
2828 if (_waveterm_si_blocked) { return }
2929
30- # Get hostname (allow empty for file:/// format)
31- $hostname = $env :COMPUTERNAME
32- if (-not $hostname ) {
33- $hostname = $env :HOSTNAME
34- }
35-
3630 # Percent-encode the raw path as-is (handles UNC, drive letters, etc.)
3731 $encoded_pwd = [System.Uri]::EscapeDataString($PWD .Path)
3832
3933 # OSC 7 - current directory
40- Write-Host -NoNewline " ` e]7; file://$hostname /$encoded_pwd ` a"
34+ Write-Host -NoNewline " ` e]7; file://localhost /$encoded_pwd ` a"
4135}
4236
4337function Global:_waveterm_si_prompt {
Original file line number Diff line number Diff line change @@ -31,22 +31,22 @@ _waveterm_si_urlencode() {
3131 else
3232 local s=" $1 "
3333 # Escape % first
34- s=${s//%/% 25}
34+ s=${s// \ %/% 25}
3535 # Common reserved characters in file paths
36- s=${s// /% 20}
37- s=${s//#/% 23}
36+ s=${s// \ /% 20}
37+ s=${s// \ #/% 23}
3838 s=${s// \? /% 3F}
39- s=${s// &/% 26}
40- s=${s// ;/% 3B}
41- s=${s// +/% 2B}
39+ s=${s// \ &/% 26}
40+ s=${s// \ ;/% 3B}
41+ s=${s// \ +/% 2B}
4242 printf ' %s' " $s "
4343 fi
4444}
4545
4646_waveterm_si_osc7 () {
4747 _waveterm_si_blocked && return
4848 local encoded_pwd=$( _waveterm_si_urlencode " $PWD " )
49- printf ' \033]7;file://%s%s \007' " $HOST " " $encoded_pwd " # OSC 7 - current directory
49+ printf ' \033]7;file://localhost%s \007' " $encoded_pwd " # OSC 7 - current directory
5050}
5151
5252_waveterm_si_precmd () {
You can’t perform that action at this time.
0 commit comments