From 7d952adf2b58195312593c7f94c610bf7a7daf49 Mon Sep 17 00:00:00 2001 From: Nils Reusse Date: Tue, 17 Jan 2017 11:31:53 +0100 Subject: [PATCH] [utility] fix warning when logging in on tty ... ${terminfo[colors}, variable not set. Check that the variable exists before checking for colors. Closes #125 --- modules/utility/init.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/utility/init.zsh b/modules/utility/init.zsh index af524c9..f8e2cfb 100644 --- a/modules/utility/init.zsh +++ b/modules/utility/init.zsh @@ -6,7 +6,7 @@ # Colours # -if (( ${terminfo[colors]} >= 8 )); then +if [[ ! -z ${terminfo[colors]} ]] && (( ${terminfo[colors]} >= 8 )); then # ls Colors if (( ${+commands[dircolors]} )); then # GNU