diff options
author | Marc Cornellà <hello@mcornella.com> | 2023-06-08 18:47:05 +0200 |
---|---|---|
committer | Marc Cornellà <hello@mcornella.com> | 2023-06-08 18:48:32 +0200 |
commit | 50c678687e73d1433f278b7bb7f168e8fa817670 (patch) | |
tree | 5f52de41346290ce370a4cd7ae655f0e17c58cb6 /lib | |
parent | 46c70406dd0b26bbd61210873ad6c86d9e8ee5da (diff) | |
download | zsh-50c678687e73d1433f278b7bb7f168e8fa817670.tar.gz zsh-50c678687e73d1433f278b7bb7f168e8fa817670.tar.bz2 zsh-50c678687e73d1433f278b7bb7f168e8fa817670.zip |
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
Diffstat (limited to 'lib')
-rw-r--r-- | lib/termsupport.zsh | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/termsupport.zsh b/lib/termsupport.zsh index cf8f08741..145982705 100644 --- a/lib/termsupport.zsh +++ b/lib/termsupport.zsh @@ -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 |