1
0
Fork 0
mirror of synced 2024-12-23 06:20:43 -05:00

[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

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