From d13614e3bb5e24e832b4172e18902114f271f393 Mon Sep 17 00:00:00 2001 From: Matt Hamilton Date: Fri, 8 Jan 2016 09:16:22 -0500 Subject: [PATCH] [prompt] change unset variable test The old test, [[ ${var} ]] tests for unset AND zero-length strings. Checking for zero length strings probably isn't that important. It is enough to ensure that the variable is set. Closes #18 --- modules/prompt/init.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/prompt/init.zsh b/modules/prompt/init.zsh index 2ee8f3a..abe443c 100644 --- a/modules/prompt/init.zsh +++ b/modules/prompt/init.zsh @@ -2,7 +2,7 @@ # load user-defined prompt # -if [[ ! ${TERM} == (linux|*bsd*|dumb) ]] && [[ ${zprompt_theme} ]]; then +if [[ ! ${TERM} == (linux|*bsd*|dumb) ]] && (( ${+zprompt_theme} )); then autoload -Uz promptinit && promptinit prompt ${zprompt_theme} fi