From de06162e8fe526b614bf405f6bebfcd7f53de95b Mon Sep 17 00:00:00 2001 From: Nils Reusse Date: Tue, 17 Jan 2017 11:31:53 +0100 Subject: [PATCH] fix warning when logging in on tty (variable not set) --- modules/utility/init.zsh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/utility/init.zsh b/modules/utility/init.zsh index af524c9..17e6b16 100644 --- a/modules/utility/init.zsh +++ b/modules/utility/init.zsh @@ -6,7 +6,8 @@ # Colours # -if (( ${terminfo[colors]} >= 8 )); then +COLORS=${terminfo[colors]} +if (( ${COLORS:=0} >= 8 )); then # ls Colors if (( ${+commands[dircolors]} )); then # GNU