[utility] fix warning when logging in on tty

... ${terminfo[colors}, variable not set. Check that the variable
exists before checking for colors.

Closes #125
This commit is contained in:
Nils Reusse 2017-01-17 11:31:53 +01:00 committed by Matt Hamilton
parent 61ff6019b1
commit 7d952adf2b
1 changed files with 1 additions and 1 deletions

View File

@ -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