mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-12-18 18:31:59 +00:00
fix(termsupport): fix pwd report for Konsole (#11730)
The Konsole terminal shows an error if the host is provided in the OSC 7 sequence. Fixes #11730
This commit is contained in:
parent
46c70406dd
commit
50c678687e
1 changed files with 4 additions and 1 deletions
|
@ -150,8 +150,11 @@ function omz_termsupport_cwd {
|
|||
URL_HOST="$(omz_urlencode -P $HOST)" || return 1
|
||||
URL_PATH="$(omz_urlencode -P $PWD)" || return 1
|
||||
|
||||
# Konsole errors if the HOST is provided
|
||||
[[ -z "$KONSOLE_VERSION" ]] || URL_HOST=""
|
||||
|
||||
# common control sequence (OSC 7) to set current host and path
|
||||
printf "\e]7;%s\a" "file://${URL_HOST}${URL_PATH}"
|
||||
printf "\e]7;file://%s%s\e\\" "${URL_HOST}" "${URL_PATH}"
|
||||
}
|
||||
|
||||
# Use a precmd hook instead of a chpwd hook to avoid contaminating output
|
||||
|
|
Loading…
Reference in a new issue