From patchwork Sat Jan 18 14:53:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eyal Soha X-Patchwork-Id: 11340105 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4BF081398 for ; Sat, 18 Jan 2020 14:55:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 24C3624699 for ; Sat, 18 Jan 2020 14:55:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="eh2PUqm6" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726345AbgAROzG (ORCPT ); Sat, 18 Jan 2020 09:55:06 -0500 Received: from mail-qk1-f193.google.com ([209.85.222.193]:33406 "EHLO mail-qk1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726208AbgAROzG (ORCPT ); Sat, 18 Jan 2020 09:55:06 -0500 Received: by mail-qk1-f193.google.com with SMTP id d71so25793210qkc.0 for ; Sat, 18 Jan 2020 06:55:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xyi3un8ozOCID92R1S6Q52/3t/3sFfnQwjXJhouk+Vc=; b=eh2PUqm6bi3KLCUJrxYPmsPvMPj78g5DHGcSXlLx673KGQNij9oXf/zSeqhPE7brq9 /mtrK+grFkmbmt2ZftPgJ5y8Sr0J7Jmj0Vi7OWr+At/VEj5eBVEd+xlIo5qIU7zDgbJ1 5x1k/iHrSvgsICzAD7aKrplN9X/w5ObFmFoHfQMlrMMmreuBvHrivxragWBKjbPvSoVx 9yhUF2kYmPSae6YYjKSAKcyyPW9Dpokb1WPd+KRrI2q27cPKyvGDv+TgBi0aWjsYtCPJ c54+8dn5UrXQYyuXK8DlB0y7y6tMGLdytuc6xMGxE+ws+mBTeDsPkNm85YVv9wQgaFbh tX+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=xyi3un8ozOCID92R1S6Q52/3t/3sFfnQwjXJhouk+Vc=; b=nrF793IVi8CvIaSrEtFT8SyCzQCkSgi6vgT2nkUDPMQdP1bhokovKYEZ8c8++JT807 KKk5os7vmVysqbPZIJ9T5cBxLD0//1GqJNSB31XIBWHSqM4NQxXrqW9E7SIcHLifWCva wV5LHdhJ05oRqMMUwp2WOhmmmaXcjnqo8dHU+dS22sCYO2dbGuOvifaKMso9NKyi937N 6MoQbU5woCEFyyE/pSI/C3PW4HwME0iWgAzG9R12qzG/XlX2S5N36IZF8rrWCcIZ3kqW iAujcPCVStrjFqTE1w+2DWNt70n+R9NofqNeMAU9dzEOd3luOE1ZwXlzNLZsvcDcDBiX v3+A== X-Gm-Message-State: APjAAAVx+qZh2TopLTFB3GspfT1QfsD9s/QjFxmHTHfPRd4aVf/PEIX5 4N5hFTgSCq0uKyXaEQu3Iv4= X-Google-Smtp-Source: APXvYqyeP7FEVWH+qME3XSF/jwjlv+ulqCIW7qe4GRFTVBENusnNBnLjch6VE3gIFLQjJffFbX5GfA== X-Received: by 2002:a05:620a:143b:: with SMTP id k27mr41431145qkj.262.1579359305600; Sat, 18 Jan 2020 06:55:05 -0800 (PST) Received: from eyalsoha.fios-router.home (pool-173-54-220-250.nwrknj.fios.verizon.net. [173.54.220.250]) by smtp.gmail.com with ESMTPSA id i28sm15122250qtc.57.2020.01.18.06.55.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Jan 2020 06:55:04 -0800 (PST) From: Eyal Soha To: peff@peff.net, git@vger.kernel.org, gitster@pobox.com Cc: Eyal Soha Subject: [PATCH 1/3] color.c: Refactor color_output to use enums Date: Sat, 18 Jan 2020 09:53:16 -0500 Message-Id: <20200118145318.5177-1-shawarmakarma@gmail.com> X-Mailer: git-send-email 2.25.0.rc2.3.g8712c6e7f0 In-Reply-To: References: MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Signed-off-by: Eyal Soha --- color.c | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/color.c b/color.c index ebb222ec33..3b734ccffd 100644 --- a/color.c +++ b/color.c @@ -24,6 +24,13 @@ const char *column_colors_ansi[] = { GIT_COLOR_RESET, }; +enum { + COLOR_BACKGROUND_OFFSET = 10, + COLOR_FOREGROUND_ANSI = 30, + COLOR_FOREGROUND_RGB = 38, + COLOR_FOREGROUND_256 = 38, +}; + /* Ignore the RESET at the end when giving the size */ const int column_colors_ansi_max = ARRAY_SIZE(column_colors_ansi) - 1; @@ -92,7 +99,7 @@ static int parse_color(struct color *out, const char *name, int len) for (i = 0; i < ARRAY_SIZE(color_names); i++) { if (match_word(name, len, color_names[i])) { out->type = COLOR_ANSI; - out->value = i; + out->value = i + COLOR_FOREGROUND_ANSI; return 0; } } @@ -112,7 +119,7 @@ static int parse_color(struct color *out, const char *name, int len) /* Rewrite low numbers as more-portable standard colors. */ } else if (val < 8) { out->type = COLOR_ANSI; - out->value = val; + out->value = val + COLOR_FOREGROUND_ANSI; return 0; } else if (val < 256) { out->type = COLOR_256; @@ -166,23 +173,26 @@ int color_parse(const char *value, char *dst) * already have the ANSI escape code in it. "out" should have enough * space in it to fit any color. */ -static char *color_output(char *out, int len, const struct color *c, char type) +static char *color_output(char *out, int len, const struct color *c, int background) { + int offset = 0; + if (background) { + offset = COLOR_BACKGROUND_OFFSET; + } switch (c->type) { case COLOR_UNSPECIFIED: case COLOR_NORMAL: break; case COLOR_ANSI: - if (len < 2) - BUG("color parsing ran out of space"); - *out++ = type; - *out++ = '0' + c->value; + out += xsnprintf(out, len, "%d", c->value + offset); break; case COLOR_256: - out += xsnprintf(out, len, "%c8;5;%d", type, c->value); + out += xsnprintf(out, len, "%d;5;%d", COLOR_FOREGROUND_256 + offset, + c->value); break; case COLOR_RGB: - out += xsnprintf(out, len, "%c8;2;%d;%d;%d", type, + out += xsnprintf(out, len, "%d;2;%d;%d;%d", + COLOR_FOREGROUND_RGB + offset, c->red, c->green, c->blue); break; } @@ -279,14 +289,12 @@ int color_parse_mem(const char *value, int value_len, char *dst) if (!color_empty(&fg)) { if (sep++) OUT(';'); - /* foreground colors are all in the 3x range */ - dst = color_output(dst, end - dst, &fg, '3'); + dst = color_output(dst, end - dst, &fg, 0); } if (!color_empty(&bg)) { if (sep++) OUT(';'); - /* background colors are all in the 4x range */ - dst = color_output(dst, end - dst, &bg, '4'); + dst = color_output(dst, end - dst, &bg, 1); } OUT('m'); } From patchwork Sat Jan 18 14:53:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eyal Soha X-Patchwork-Id: 11340107 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7D24B1398 for ; Sat, 18 Jan 2020 14:55:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5A6832469E for ; Sat, 18 Jan 2020 14:55:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bmQcaCad" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726388AbgAROzO (ORCPT ); Sat, 18 Jan 2020 09:55:14 -0500 Received: from mail-qv1-f65.google.com ([209.85.219.65]:35675 "EHLO mail-qv1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726208AbgAROzO (ORCPT ); Sat, 18 Jan 2020 09:55:14 -0500 Received: by mail-qv1-f65.google.com with SMTP id u10so12072491qvi.2 for ; Sat, 18 Jan 2020 06:55:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=dWxfZV27edfVdXXUFNiZBybhEktkPs+VCK1rOgtP4LQ=; b=bmQcaCadtp/7pkFTQImo0H0vTY7SWWXA3/BPyNs/GB6qiKhC+T3FOsmQ/94P7Kda9c QJV5xfwbqKiDkRqexqa4mHICnV4D0jJ8U+hP5+xlbZQmQQrPwl0SE0lQNe4vqtLUt4ok BDpJfUqhEm/JdgNM3siW8B/778Ofck5myYoccqpck9ZHhoSQF+f3x4x+tbw4YgqrE7oY p+P/e7mBKFT1LC0tfjQd2aZRzbgmg7tkrDJDRsrVLuswk5Dmxr9dHf4UyjGQbRbmRcYx ES0br3sd9O6qywy3e1AWhFAhp9HcwKBWo+VG46+wc/1PgYutrwiackO2Qf95w9SyAbx0 ITrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=dWxfZV27edfVdXXUFNiZBybhEktkPs+VCK1rOgtP4LQ=; b=uesy6e9nU2HfI68JnLpcrq0RB40p6Z6qbK+qk7HaoGERDdobpzIrs4OQ3JfhGu8ozI KqauINQ4oMDeuu6iNhR99WjaXWaqy3oatDTdxO2oWggTsKz9t9Z1zCwZhDbKdj2QfqNc kn6GTCRlsupQnsfpRihSVFIu8qg2231auEDV4FhQNgKWjH4lBVCWcwUDJWepa8DAwk7E e8JjytX9UMmB1dsZMmwzzYmhZxQdCltjUDQWnR6y2OH5rW/CaHSwKt5ENtcDEifNsQit HzSKbv3sMbCWF8OZdQ7mASLsW4wF5uujeFjqVQ6DtdjJwPfhOE/Nu2+kTqSqU0cRfLyO hmvw== X-Gm-Message-State: APjAAAUXlLiu5/B6ZIIX+9ssLwfVhbi6JPqvsik6giTPnarTw9ib6qkx GZfQia1p3B9WxLlJKlV4Lu6koQ/nwQI= X-Google-Smtp-Source: APXvYqwGh69RA9RSDX5tYkXQzNYpHfKD4K3E8n3sNsEa518TW+X8OumWr0PHX8iIzG8T++ty8NslwA== X-Received: by 2002:a05:6214:287:: with SMTP id l7mr12901561qvv.142.1579359313005; Sat, 18 Jan 2020 06:55:13 -0800 (PST) Received: from eyalsoha.fios-router.home (pool-173-54-220-250.nwrknj.fios.verizon.net. [173.54.220.250]) by smtp.gmail.com with ESMTPSA id i28sm15122250qtc.57.2020.01.18.06.55.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Jan 2020 06:55:12 -0800 (PST) From: Eyal Soha To: peff@peff.net, git@vger.kernel.org, gitster@pobox.com Cc: Eyal Soha Subject: [PATCH 2/3] color.c: Support bright aixterm colors Date: Sat, 18 Jan 2020 09:53:17 -0500 Message-Id: <20200118145318.5177-2-shawarmakarma@gmail.com> X-Mailer: git-send-email 2.25.0.rc2.3.g8712c6e7f0 In-Reply-To: <20200118145318.5177-1-shawarmakarma@gmail.com> References: <20200118145318.5177-1-shawarmakarma@gmail.com> MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org These colors are the bright variants of the 3-bit colors. Signed-off-by: Eyal Soha --- Documentation/config.txt | 4 +++- color.c | 34 +++++++++++++++++++++++++++------- t/t4026-color.sh | 8 ++++++++ 3 files changed, 38 insertions(+), 8 deletions(-) diff --git a/Documentation/config.txt b/Documentation/config.txt index 83e7bba872..08b13ba72b 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -263,7 +263,9 @@ color:: + The basic colors accepted are `normal`, `black`, `red`, `green`, `yellow`, `blue`, `magenta`, `cyan` and `white`. The first color given is the -foreground; the second is the background. +foreground; the second is the background. All the basic colors except +`normal` have a bright variant that can be speficied by prefixing the +color with `bright`, like `brightred`. + Colors may also be given as numbers between 0 and 255; these use ANSI 256-color mode (but note that not all terminals may support this). If diff --git a/color.c b/color.c index 3b734ccffd..66d32e1191 100644 --- a/color.c +++ b/color.c @@ -29,6 +29,7 @@ enum { COLOR_FOREGROUND_ANSI = 30, COLOR_FOREGROUND_RGB = 38, COLOR_FOREGROUND_256 = 38, + COLOR_FOREGROUND_BRIGHT_ANSI = 90, }; /* Ignore the RESET at the end when giving the size */ @@ -68,13 +69,36 @@ static int get_hex_color(const char *in, unsigned char *out) return 0; } -static int parse_color(struct color *out, const char *name, int len) +/* + * If an ANSI color is recognized in "name", fill "out" and return 0. + * Otherwise, leave out unchanged and return -1. + */ +static int parse_ansi_color(struct color *out, const char *name, int len) { /* Positions in array must match ANSI color codes */ static const char * const color_names[] = { "black", "red", "green", "yellow", "blue", "magenta", "cyan", "white" }; + + int color_offset = COLOR_FOREGROUND_ANSI; + if (strncasecmp(name, "bright", 6) == 0) { + color_offset = COLOR_FOREGROUND_BRIGHT_ANSI; + name += 6; + len -= 6; + } + for (int i = 0; i < ARRAY_SIZE(color_names); i++) { + if (match_word(name, len, color_names[i])) { + out->type = COLOR_ANSI; + out->value = i + color_offset; + return 0; + } + } + return -1; +} + +static int parse_color(struct color *out, const char *name, int len) +{ char *end; int i; long val; @@ -96,12 +120,8 @@ static int parse_color(struct color *out, const char *name, int len) } /* Then pick from our human-readable color names... */ - for (i = 0; i < ARRAY_SIZE(color_names); i++) { - if (match_word(name, len, color_names[i])) { - out->type = COLOR_ANSI; - out->value = i + COLOR_FOREGROUND_ANSI; - return 0; - } + if (parse_ansi_color(out, name, len) == 0) { + return 0; } /* And finally try a literal 256-color-mode number */ diff --git a/t/t4026-color.sh b/t/t4026-color.sh index 671e951ee5..78c69de90a 100755 --- a/t/t4026-color.sh +++ b/t/t4026-color.sh @@ -30,6 +30,14 @@ test_expect_success 'attribute before color name' ' color "bold red" "[1;31m" ' +test_expect_success 'aixterm bright fg color' ' + color "brightred" "[91m" +' + +test_expect_success 'aixterm bright bg color' ' + color "green brightblue" "[32;104m" +' + test_expect_success 'color name before attribute' ' color "red bold" "[1;31m" ' From patchwork Sat Jan 18 14:53:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eyal Soha X-Patchwork-Id: 11340109 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D42441398 for ; Sat, 18 Jan 2020 14:55:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B268B24699 for ; Sat, 18 Jan 2020 14:55:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="o+WvMkvM" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726442AbgAROzQ (ORCPT ); Sat, 18 Jan 2020 09:55:16 -0500 Received: from mail-qk1-f193.google.com ([209.85.222.193]:43743 "EHLO mail-qk1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726208AbgAROzQ (ORCPT ); Sat, 18 Jan 2020 09:55:16 -0500 Received: by mail-qk1-f193.google.com with SMTP id t129so25752061qke.10 for ; Sat, 18 Jan 2020 06:55:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Meauu3WNUUR2a+uruKM7Q3ZWnrqsAvwh+jHH/8uy3T4=; b=o+WvMkvMBR+pGy9b2JUV6vmW+2P7f6WTohsqPxgmS54c/nXzSi8yn1bTWa82F3LzHJ JKkZwWvy3liF7wmQFyiVg8CLSivRzWxtahAnCcrTwhutj76cLsSDNoUpcCuQ5lxS5hD6 Mu3u5SKMCBbopvG8lBcH5fIU0sn5R/N4Bf5TS+F966OjDt5gMHCZUOJXs8/RI2QHfB9Y PXvZTmvq+2thjw+2rsSX3KrUrD1baT9EGDNEUAgHPoZH9BqSVFPLNnB0f5MCuPJgrn6g AqIdHUdi/KMMqwyrvq2UHwP5NyhiwuIYO9PrEas3rsLIkEpvqH7iUMfv/E2/vLneGA51 DL2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Meauu3WNUUR2a+uruKM7Q3ZWnrqsAvwh+jHH/8uy3T4=; b=Q4ReYv47f9T3gm2zJeQ/7WijasEv82AJEixApIK8NLsU/J21y11HezKx+baqXkLRSX EfZq37pfY6a7YqgiO8UfIm6I7B4GugItZjbwqLC8wPLeVQa7oI8141ptfPR1FnWWENXX qeXR/GBbdIGp+oEZ1U+BG2byDJQ6eC1PVFeReaoFArMZAQyOSU/cxBtJ80HrP9AIPpbM LsmS3dMWHkIsT3I2h95k1PXGFQbGCUFs78Llu+QNxHCOvMQvGisOnEoDW/ClCv0bhAxs 41xCqKVJ1X1BVWlaRcNEdyijfSvj74uX7kEQud+amizr8/nF/qo/9mWucUkqhZIfK60T M1Jw== X-Gm-Message-State: APjAAAX/GfSAmlpeXyqDPtp2R1BkstCNYxkPuSYQkmBai66up+iiUQfi 70nnyWy/gZ9pO+sMzfN0L+k= X-Google-Smtp-Source: APXvYqx36ZclptkBrUsFClqHVlmvIQkN+1+MhzyM/dVM2SFUbbA1NX6I20v1aDXG+nmQjVzBnEzn/g== X-Received: by 2002:a37:de16:: with SMTP id h22mr38407977qkj.400.1579359315566; Sat, 18 Jan 2020 06:55:15 -0800 (PST) Received: from eyalsoha.fios-router.home (pool-173-54-220-250.nwrknj.fios.verizon.net. [173.54.220.250]) by smtp.gmail.com with ESMTPSA id i28sm15122250qtc.57.2020.01.18.06.55.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Jan 2020 06:55:14 -0800 (PST) From: Eyal Soha To: peff@peff.net, git@vger.kernel.org, gitster@pobox.com Cc: Eyal Soha Subject: [PATCH 3/3] color.c: Alias RGB colors 8-15 to aixterm colors Date: Sat, 18 Jan 2020 09:53:18 -0500 Message-Id: <20200118145318.5177-3-shawarmakarma@gmail.com> X-Mailer: git-send-email 2.25.0.rc2.3.g8712c6e7f0 In-Reply-To: <20200118145318.5177-1-shawarmakarma@gmail.com> References: <20200118145318.5177-1-shawarmakarma@gmail.com> MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org This results in shorter output, and is _probably_ more portable. There is at least one environment (GitHub Actions) which supports 16-color mode but not 256-color mode. It's possible there are environments which go the other way, but it seems unlikely. Signed-off-by: Eyal Soha --- color.c | 7 ++++++- t/t4026-color.sh | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/color.c b/color.c index 66d32e1191..ba067ed97a 100644 --- a/color.c +++ b/color.c @@ -136,11 +136,16 @@ static int parse_color(struct color *out, const char *name, int len) else if (val < 0) { out->type = COLOR_NORMAL; return 0; - /* Rewrite low numbers as more-portable standard colors. */ + /* Rewrite 0-7 as more-portable standard colors. */ } else if (val < 8) { out->type = COLOR_ANSI; out->value = val + COLOR_FOREGROUND_ANSI; return 0; + /* Rewrite 8-15 as more-portable aixterm colors. */ + } else if (val < 16) { + out->type = COLOR_ANSI; + out->value = val - 8 + COLOR_FOREGROUND_BRIGHT_ANSI; + return 0; } else if (val < 256) { out->type = COLOR_256; out->value = val; diff --git a/t/t4026-color.sh b/t/t4026-color.sh index 78c69de90a..c0b642c1ab 100755 --- a/t/t4026-color.sh +++ b/t/t4026-color.sh @@ -82,6 +82,10 @@ test_expect_success '0-7 are aliases for basic ANSI color names' ' color "0 7" "[30;47m" ' +test_expect_success '8-15 are aliases for aixterm color names' ' + color "12 13" "[94;105m" +' + test_expect_success '256 colors' ' color "254 bold 255" "[1;38;5;254;48;5;255m" '