From e606ac70514fe31e40af53b818f07a967d185185 Mon Sep 17 00:00:00 2001 From: Patrick Moore Date: Tue, 30 Jun 2020 09:54:27 -0700 Subject: Handle unset variables in various parts of the codebase (#8944) DISABLE_UNTRACKED_FILES_DIRTY, DISABLE_AUTO_TITLE, GIT_STATUS_IGNORE_SUBMODULES are not set Handle these variables not being set with conditional access. If the user has set -u option to report attempts to use undeclared / unassigned variable, accessing the variables needs to be conditional. --- lib/termsupport.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/termsupport.zsh') diff --git a/lib/termsupport.zsh b/lib/termsupport.zsh index e3237ca34..069b7f328 100644 --- a/lib/termsupport.zsh +++ b/lib/termsupport.zsh @@ -50,13 +50,13 @@ fi # Runs before showing the prompt function omz_termsupport_precmd { - [[ "$DISABLE_AUTO_TITLE" == true ]] && return + [[ "${DISABLE_AUTO_TITLE:-}" == true ]] && return title $ZSH_THEME_TERM_TAB_TITLE_IDLE $ZSH_THEME_TERM_TITLE_IDLE } # Runs before executing the command function omz_termsupport_preexec { - [[ "$DISABLE_AUTO_TITLE" == true ]] && return + [[ "${DISABLE_AUTO_TITLE:-}" == true ]] && return emulate -L zsh setopt extended_glob -- cgit v1.2.3-70-g09d2