From 303ae79712d8d1df05b3ec6f63eb129c9a2ed031 Mon Sep 17 00:00:00 2001 From: Kuri Schlarb <246386+ntninja@users.noreply.github.com> Date: Thu, 27 Jan 2022 20:48:42 +0000 Subject: [PATCH] fix(ys): fix `$VIRTUAL_ENV` check if `nounset` is enabled (#9915) --- themes/ys.zsh-theme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/ys.zsh-theme b/themes/ys.zsh-theme index 5ef500e14..4c3c56ffc 100644 --- a/themes/ys.zsh-theme +++ b/themes/ys.zsh-theme @@ -49,7 +49,7 @@ local venv_info='$(virtenv_prompt)' YS_THEME_VIRTUALENV_PROMPT_PREFIX=" %{$fg[green]%}" YS_THEME_VIRTUALENV_PROMPT_SUFFIX=" %{$reset_color%}%" virtenv_prompt() { - [[ -n ${VIRTUAL_ENV} ]] || return + [[ -n "${VIRTUAL_ENV:-}" ]] || return echo "${YS_THEME_VIRTUALENV_PROMPT_PREFIX}${VIRTUAL_ENV:t}${YS_THEME_VIRTUALENV_PROMPT_SUFFIX}" }