From fbf3a0a6d0e836a82bd7a514bdbe75f0e6d2249e Mon Sep 17 00:00:00 2001 From: Jonathan Schleifer Date: Mon, 28 Dec 2020 03:59:01 +0000 Subject: [PATCH] zshrc: Add fallback for 8 color terminals --- zshrc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/zshrc b/zshrc index 84e38f5..dce2dee 100644 --- a/zshrc +++ b/zshrc @@ -25,12 +25,18 @@ if [ "$COLORTERM" = "24bit" -o "$COLORTERM" = "truecolor" \ local color_suffix="#29bc7d" local color_vcs="#43d696" local color_vcs_braces="#29bc7d" -else +elif [ "$terminfo[colors]" = 256 ]; then local color_cwd="29" local color_host="23" local color_suffix="36" local color_vcs="78" local color_vcs_braces="36" +else + local color_cwd=2 + local color_host=6 + local color_suffix=2 + local color_vcs=2 + local color_vcs_braces=2 fi local color_jobs="yellow" local color_status="red"