Fix bash integration cwd reporting missing hostname

This commit is contained in:
pagedown 2022-03-23 19:29:18 +08:00
parent 4309aa1ace
commit a765d551e4
No known key found for this signature in database
GPG Key ID: E921CF18AC8FF6EB

View File

@ -157,7 +157,7 @@ _ksi_main() {
# command like cd /test && cat. PS0 is evaluated before cd is run. # command like cd /test && cat. PS0 is evaluated before cd is run.
if [[ "${_ksi_prompt[last_reported_cwd]}" != "$PWD" ]]; then if [[ "${_ksi_prompt[last_reported_cwd]}" != "$PWD" ]]; then
_ksi_prompt[last_reported_cwd]="$PWD"; _ksi_prompt[last_reported_cwd]="$PWD";
builtin printf "\e]7;kitty-shell-cwd://%s%s\a" "$HOST" "$PWD" builtin printf "\e]7;kitty-shell-cwd://%s%s\a" "$HOSTNAME" "$PWD"
fi fi
fi fi
} }