From patchwork Tue Jan 21 16:56:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eyal Soha X-Patchwork-Id: 11344251 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 BCE0B1820 for ; Tue, 21 Jan 2020 16:56:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9AFF224655 for ; Tue, 21 Jan 2020 16:56:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ix7sblMf" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729162AbgAUQ4z (ORCPT ); Tue, 21 Jan 2020 11:56:55 -0500 Received: from mail-pf1-f195.google.com ([209.85.210.195]:40184 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726555AbgAUQ4z (ORCPT ); Tue, 21 Jan 2020 11:56:55 -0500 Received: by mail-pf1-f195.google.com with SMTP id q8so1779114pfh.7 for ; Tue, 21 Jan 2020 08:56:55 -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=TV3mbvWcaqeDbATsmsle2Y8wFLs61YU48+eI9Mr8A28=; b=ix7sblMfwySn1EI674yJqSldrkvXbcVmkf2VjP6rM7+Iou93Y2Am0dbNoKs4Lc9b3A GGHsZVljJ9MV5+l1DSJMto6sJ8CvaxHj9wNViM20XJE4dUsbLv8bt72hdfGBV6+emFLX sdO4hWN1kh7jznh9ioUHNraHW6voSuFhULI8qoCexoLC4fW/tF1TZYudfG3L7Dh53HKH YIRyduBa2GIFHBrFA3mxqkqgTUXvsyOaho0Qf5gli33GqchuNXadWzRRZWufIPHG0DlA 1KXIjV7bsEz2ZQBlhLTs3n3FuBh0gl7Pw4UEp2vWLE+0t1HGFXt/lI32+HiNf+VFVcA6 YIuw== 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=TV3mbvWcaqeDbATsmsle2Y8wFLs61YU48+eI9Mr8A28=; b=RjJvli1hKJtBGqqwBOMvF4OGpozF9U1KWHWCaY93cqds2oDw5b3zE7tAWkGJo+HpHP RsOrHeqKW3MfhdmVLy4YBvSKfjqoKvkQz95MqArO/gwynN22boDsxZbcubxTMGdAEGyx OtcRoo0zwOLlSGfP7f5ZfMPol+TI3ilTIqBPB74g6fA5GUL+MzY1Y4zTAEKLAzjl7pkG q9fjUaACf/enm7qQV2E6LaVULTuFZnILq4HEzSGnVXny4B5gyRXxn+ww50oKq+y3nfZM RAa1EqjjzgGI+LfeLQbMrl7LpCfgtbtyoisJ1mNGqAWSPW7zf2SSLWl/nhhkLANHamZZ bErQ== X-Gm-Message-State: APjAAAUw/SES86G05BhDbpAmovwKP5PK8xeQ/SnewkJuqMUh+0mfAqZE jlyWQMu5PtIQV4YDde7UUxs= X-Google-Smtp-Source: APXvYqzikXJPT6kzZ+z74H5gRJxjesElhLj3u2tz6VEH0DlIsjeXeRPeNUow4Q6vWX1W/Xgjik3Mdg== X-Received: by 2002:a65:4c82:: with SMTP id m2mr6214858pgt.432.1579625814678; Tue, 21 Jan 2020 08:56:54 -0800 (PST) Received: from eyalsoha.corp.google.com ([2620:0:1000:5e10:e008:c42d:32e0:39dc]) by smtp.gmail.com with ESMTPSA id r66sm45688491pfc.74.2020.01.21.08.56.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jan 2020 08:56:53 -0800 (PST) From: Eyal Soha To: gitster@pobox.com, peff@peff.net, git@vger.kernel.org Cc: Eyal Soha Subject: [PATCH 1/3] color.c: refactor color_output arguments Date: Tue, 21 Jan 2020 08:56:21 -0800 Message-Id: <20200121165623.151880-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 color_output() now uses a more descriptive "background" argument instead of "type". 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 Tue Jan 21 16:56:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eyal Soha X-Patchwork-Id: 11344253 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 C12D013A4 for ; Tue, 21 Jan 2020 16:57:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9FDDD24655 for ; Tue, 21 Jan 2020 16:57:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="NmpLdzxz" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729165AbgAUQ47 (ORCPT ); Tue, 21 Jan 2020 11:56:59 -0500 Received: from mail-pf1-f195.google.com ([209.85.210.195]:36354 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726555AbgAUQ47 (ORCPT ); Tue, 21 Jan 2020 11:56:59 -0500 Received: by mail-pf1-f195.google.com with SMTP id x184so1792993pfb.3 for ; Tue, 21 Jan 2020 08:56:59 -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=zmGmA8lKEX47bitNrdLA9u2ZrSmJYYcvfDXA9GwoOgM=; b=NmpLdzxz4BdtKLw/t2d9fiTF6YfGWO+gH54uCOPZqmgLTKGzvgnU2P9wiyd85YCs4i GcGz3AIQdcD5yPPrHsYkEFAUMEKCWt0YBwbVAs1LqP/ntIgCgV+o1Ss6sN090CalekSN 6RP026B1YrWVZmEolGo4dYTSsoVylGBkZg1pX+ICLJYj9KGr5k+BiLFe1BP3YnM+buFQ TvjNySUzPImZB0n0F8c1AtkGESyHqqo91NCtKu6B+nJuTarLHtgkcJ0GVpbWdPP1xbNv 8Wj4G6O21YvuL2dP2HSZ1jcge03/O1aswm9qQf7GTuRYRIA9NwrCGRBOLSt3fGyTg+Ir WxFw== 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=zmGmA8lKEX47bitNrdLA9u2ZrSmJYYcvfDXA9GwoOgM=; b=Kifs8PcxV6zsB9TcP+Ie6Z1Wdrv7/YqyitC3zVbFEPVghbhmz/VpZT9G4Wh5KnOdi+ AB63eI6xPcjhysoqtvEF+ejYrSnRB5kpprrJ7SKfL6hKpl/cN/w5X1TlyNbXJldZa9ao Pb+B8lsx5Oqo9uZF0Uvo0IfGVWJo84FLKN0+GxJXcICQTlBjNIRbe0tMOIKGqD6xFUUK 7fwXZuTQrFkgVmcD4sqtC72cxZU3VRzcLUeO0kVbkzB+iRutGqJEgEJaDJ9O8HkPvCFk TFd7tcw1JBvSZ+iArqWE93/G1OhXbM9dQrFN43JJ7MofcFirSJOjPuVQ4LF5aabQsCjp Xtig== X-Gm-Message-State: APjAAAXjElWCyea8zg0XRxWaQU4Er6WOv9ZNjIpGk+MOd8SDfS+cLMd1 PBmwAehPcNBzLC0/IOLPmvFYDwTHtjg= X-Google-Smtp-Source: APXvYqw9p/PlbD8xviqRqfKWSRD+KofcTkoDpm/NKHSrsQjzGnTP7DvbAEaEufN+dg0jFzI0W7F8jw== X-Received: by 2002:a63:2a8b:: with SMTP id q133mr6265701pgq.72.1579625818837; Tue, 21 Jan 2020 08:56:58 -0800 (PST) Received: from eyalsoha.corp.google.com ([2620:0:1000:5e10:e008:c42d:32e0:39dc]) by smtp.gmail.com with ESMTPSA id r66sm45688491pfc.74.2020.01.21.08.56.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jan 2020 08:56:58 -0800 (PST) From: Eyal Soha To: gitster@pobox.com, peff@peff.net, git@vger.kernel.org Cc: Eyal Soha Subject: [PATCH 2/3] color.c: support bright aixterm colors Date: Tue, 21 Jan 2020 08:56:22 -0800 Message-Id: <20200121165623.151880-2-shawarmakarma@gmail.com> X-Mailer: git-send-email 2.25.0.rc2.3.g8712c6e7f0 In-Reply-To: <20200121165623.151880-1-shawarmakarma@gmail.com> References: <20200121165623.151880-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. Instead of 30-37 range for the foreground and 40-47 range for the background, they live in 90-97 and 100-107 range, respectively. 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 Tue Jan 21 16:56:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eyal Soha X-Patchwork-Id: 11344255 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 6AB601820 for ; Tue, 21 Jan 2020 16:57:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 49E4B24653 for ; Tue, 21 Jan 2020 16:57:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="tfp+RbCA" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729190AbgAUQ5E (ORCPT ); Tue, 21 Jan 2020 11:57:04 -0500 Received: from mail-pj1-f67.google.com ([209.85.216.67]:36163 "EHLO mail-pj1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726555AbgAUQ5E (ORCPT ); Tue, 21 Jan 2020 11:57:04 -0500 Received: by mail-pj1-f67.google.com with SMTP id n59so1842872pjb.1 for ; Tue, 21 Jan 2020 08:57:03 -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=tfp+RbCASnsgjMow9mTxt75Y/NEPtcxJr0Z8cu5qc5Gjbm3T0JMemIPu3AiaP2E58S llf6da4K2ntT8nq2/6WzoB7SAdWgitQ24Hs+uIq3IPvYeA7ROIvN3cqwUYAQat303Z3s FHK+6NaSYmKfwDHgmDuW4z+n1AwOUwSPxWyo+Mmc8+cGbuJ3cQyWRFyB5VUz8W+mhl3F 5V2wwj1xvpg9jEsMKQbg8KxT/YiN+uqP41GD+4TfqgGBhrrBy/EQKTi+vEAdGTarV0H4 JjG41cpmBIFEic4KmS7V3cXvLWx5VoMYhYqbGTmGelPVmFPnco3JiJ/ciXgDjfkw6joz 0bog== 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=N0GV+Gh5Px6MQdwTfEpmlGH0gI23Enkm+Az4quVoUZAw8HjAlua5UYmxrsjaCW82Ja np72FUgJQFPP0G6Be5E4Oe0vCUYm3/hM+4XJB+Ygz+BDJPdUhc2SG07NgtvKAEO4tfoN WArLs/g5TtsGqhZCfwSrJZFoiFxKIEzAy91OyGsD/yC/RR+eSesOS0sOSMdtWFmUq23R UfLPorIrThlhNuy+6XXaIbx520MEkzg2OHJCHpFRteLZgZs8kKhTZEo0486P7FDxoiSP EYCJvPHBmUqjAxm28kWkCTIkUMvy6CgOyLmRUpcfzqcx0x9h47/o/ToFcoXYl8BIoFov 6FTg== X-Gm-Message-State: APjAAAX2J2AcXRhZrJJ5w401D5BbtdtgZ8ykPu0Z2SIjTwQwEQOcyse5 83lzwDHFxaTRaYQ5LcuYYMQ= X-Google-Smtp-Source: APXvYqw/K2kd93sAjfVEu7asIhKgEArXn3Q7g/PN27inva3bRaNr62jN7PVqOotZDneqywtYw7B7sg== X-Received: by 2002:a17:902:9889:: with SMTP id s9mr5887221plp.252.1579625823362; Tue, 21 Jan 2020 08:57:03 -0800 (PST) Received: from eyalsoha.corp.google.com ([2620:0:1000:5e10:e008:c42d:32e0:39dc]) by smtp.gmail.com with ESMTPSA id r66sm45688491pfc.74.2020.01.21.08.57.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jan 2020 08:57:02 -0800 (PST) From: Eyal Soha To: gitster@pobox.com, peff@peff.net, git@vger.kernel.org Cc: Eyal Soha Subject: [PATCH 3/3] color.c: alias RGB colors 8-15 to aixterm colors Date: Tue, 21 Jan 2020 08:56:23 -0800 Message-Id: <20200121165623.151880-3-shawarmakarma@gmail.com> X-Mailer: git-send-email 2.25.0.rc2.3.g8712c6e7f0 In-Reply-To: <20200121165623.151880-1-shawarmakarma@gmail.com> References: <20200121165623.151880-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" '