1
0
mirror of https://github.com/robbyrussell/oh-my-zsh.git synced 2025-12-06 07:20:40 +01:00

fix(termsupport): ensure ohmyzsh can run with set -eu

Closes #12870
This commit is contained in:
Carlo Sala
2025-03-20 20:02:34 +01:00
parent 85d60d489c
commit 5eaebdf0fe
2 changed files with 4 additions and 2 deletions

View File

@@ -47,7 +47,7 @@ fi
# Runs before showing the prompt
function omz_termsupport_precmd {
[[ "${DISABLE_AUTO_TITLE:-}" != true ]] || return
[[ "${DISABLE_AUTO_TITLE:-}" != true ]] || return 0
title "$ZSH_THEME_TERM_TAB_TITLE_IDLE" "$ZSH_THEME_TERM_TITLE_IDLE"
}
@@ -145,6 +145,7 @@ esac
# Identifies the directory using a file: URI scheme, including
# the host name to disambiguate local vs. remote paths.
function omz_termsupport_cwd {
setopt localoptions unset
# Percent-encode the host and path names.
local URL_HOST URL_PATH
URL_HOST="$(omz_urlencode -P $HOST)" || return 1